Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Aug 2010 16:23:07 +0000 (09:23 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Aug 2010 16:23:07 +0000 (09:23 -0700)
* 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  Revert "net: Make accesses to ->br_port safe for sparse RCU"
  mce: convert to rcu_dereference_index_check()
  net: Make accesses to ->br_port safe for sparse RCU
  vfs: add fs.h to define struct file
  lockdep: Add an in_workqueue_context() lockdep-based test function
  rcu: add __rcu API for later sparse checking
  rcu: add an rcu_dereference_index_check()
  tree/tiny rcu: Add debug RCU head objects
  mm: remove all rcu head initializations
  fs: remove all rcu head initializations, except on_stack initializations
  powerpc: remove all rcu head initializations

1  2 
arch/x86/kernel/cpu/mcheck/mce.c
include/linux/fdtable.h
lib/Kconfig.debug
mm/backing-dev.c

index 1970ef911c99b368e2f1f9e947bcdae71d2a2d84,0e78657e29c56c9906696888b2970c69a215ffb7..e1269d62c569a3ec79f59516712c89192c2071bb
@@@ -51,7 -51,7 +51,7 @@@
  static DEFINE_MUTEX(mce_read_mutex);
  
  #define rcu_dereference_check_mce(p) \
-       rcu_dereference_check((p), \
+       rcu_dereference_index_check((p), \
                              rcu_read_lock_sched_held() || \
                              lockdep_is_held(&mce_read_mutex))
  
@@@ -600,7 -600,6 +600,7 @@@ void machine_check_poll(enum mcp_flags 
                 */
                if (!(flags & MCP_DONTLOG) && !mce_dont_log_ce) {
                        mce_log(&m);
 +                      atomic_notifier_call_chain(&x86_mce_decoder_chain, 0, &m);
                        add_taint(TAINT_MACHINE_CHECK);
                }
  
diff --combined include/linux/fdtable.h
index d147461bc2712b9c9fb7aae84d65e600d6c60fd4,551671e879278fbf60322f35ff40da54a8141327..f59ed297b661fceb086a6ca188b54c3ff0006f85
@@@ -11,6 -11,7 +11,7 @@@
  #include <linux/rcupdate.h>
  #include <linux/types.h>
  #include <linux/init.h>
+ #include <linux/fs.h>
  
  #include <asm/atomic.h>
  
@@@ -61,8 -62,7 +62,8 @@@ struct files_struct 
        (rcu_dereference_check((fdtfd), \
                               rcu_read_lock_held() || \
                               lockdep_is_held(&(files)->file_lock) || \
 -                             atomic_read(&(files)->count) == 1))
 +                             atomic_read(&(files)->count) == 1 || \
 +                             rcu_my_thread_group_empty()))
  
  #define files_fdtable(files) \
                (rcu_dereference_check_fdtable((files), (files)->fdt))
diff --combined lib/Kconfig.debug
index 67fa774f9572cd21c6dc160e67bb2e509ec54db2,142faa2ec6658b2943ee1a771355eb22d73429d0..e80d6bf1c43d39050ab09fe55198073e4a585b3c
@@@ -307,6 -307,12 +307,12 @@@ config DEBUG_OBJECTS_WOR
          work queue routines to track the life time of work objects and
          validate the work operations.
  
+ config DEBUG_OBJECTS_RCU_HEAD
+       bool "Debug RCU callbacks objects"
+       depends on DEBUG_OBJECTS && PREEMPT
+       help
+         Enable this to turn on debugging of RCU list heads (call_rcu() usage).
  config DEBUG_OBJECTS_ENABLE_DEFAULT
        int "debug_objects bootup default value (0-1)"
          range 0 1
@@@ -528,7 -534,7 +534,7 @@@ config LOCKDE
        bool
        depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
        select STACKTRACE
 -      select FRAME_POINTER if !MIPS && !PPC && !ARM_UNWIND && !S390
 +      select FRAME_POINTER if !MIPS && !PPC && !ARM_UNWIND && !S390 && !MICROBLAZE
        select KALLSYMS
        select KALLSYMS_ALL
  
@@@ -628,19 -634,6 +634,19 @@@ config DEBUG_INF
  
          If unsure, say N.
  
 +config DEBUG_INFO_REDUCED
 +      bool "Reduce debugging information"
 +      depends on DEBUG_INFO
 +      help
 +        If you say Y here gcc is instructed to generate less debugging
 +        information for structure types. This means that tools that
 +        need full debugging information (like kgdb or systemtap) won't
 +        be happy. But if you merely need debugging information to
 +        resolve line numbers there is no loss. Advantage is that
 +        build directory object sizes shrink dramatically over a full
 +        DEBUG_INFO build and compile times are reduced too.
 +        Only works with newer gcc versions.
 +
  config DEBUG_VM
        bool "Debug VM"
        depends on DEBUG_KERNEL
@@@ -950,7 -943,7 +956,7 @@@ config FAIL_MAKE_REQUES
          Provide fault-injection capability for disk IO.
  
  config FAIL_IO_TIMEOUT
 -      bool "Faul-injection capability for faking disk interrupts"
 +      bool "Fault-injection capability for faking disk interrupts"
        depends on FAULT_INJECTION && BLOCK
        help
          Provide fault-injection capability on end IO handling. This
@@@ -971,13 -964,13 +977,13 @@@ config FAULT_INJECTION_STACKTRACE_FILTE
        depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT
        depends on !X86_64
        select STACKTRACE
 -      select FRAME_POINTER if !PPC && !S390
 +      select FRAME_POINTER if !PPC && !S390 && !MICROBLAZE
        help
          Provide stacktrace filter for fault-injection capabilities
  
  config LATENCYTOP
        bool "Latency measuring infrastructure"
 -      select FRAME_POINTER if !MIPS && !PPC && !S390
 +      select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE
        select KALLSYMS
        select KALLSYMS_ALL
        select STACKTRACE
diff --combined mm/backing-dev.c
index 123bcef13e51806ce3d57232d4ad665a60d7d172,42f6d20358ad68cec99cd5ddaf399a288b3d4943..f9fd3dd3916b97067fbac7b2742c2195c04f4748
@@@ -104,13 -104,15 +104,13 @@@ static int bdi_debug_stats_show(struct 
                   "b_more_io:        %8lu\n"
                   "bdi_list:         %8u\n"
                   "state:            %8lx\n"
 -                 "wb_mask:          %8lx\n"
 -                 "wb_list:          %8u\n"
 -                 "wb_cnt:           %8u\n",
 +                 "wb_list:          %8u\n",
                   (unsigned long) K(bdi_stat(bdi, BDI_WRITEBACK)),
                   (unsigned long) K(bdi_stat(bdi, BDI_RECLAIMABLE)),
                   K(bdi_thresh), K(dirty_thresh),
                   K(background_thresh), nr_wb, nr_dirty, nr_io, nr_more_io,
 -                 !list_empty(&bdi->bdi_list), bdi->state, bdi->wb_mask,
 -                 !list_empty(&bdi->wb_list), bdi->wb_cnt);
 +                 !list_empty(&bdi->bdi_list), bdi->state,
 +                 !list_empty(&bdi->wb_list));
  #undef K
  
        return 0;
@@@ -338,13 -340,14 +338,13 @@@ int bdi_has_dirty_io(struct backing_dev
  static void bdi_flush_io(struct backing_dev_info *bdi)
  {
        struct writeback_control wbc = {
 -              .bdi                    = bdi,
                .sync_mode              = WB_SYNC_NONE,
                .older_than_this        = NULL,
                .range_cyclic           = 1,
                .nr_to_write            = 1024,
        };
  
 -      writeback_inodes_wbc(&wbc);
 +      writeback_inodes_wb(&bdi->wb, &wbc);
  }
  
  /*
@@@ -665,13 -668,18 +665,12 @@@ int bdi_init(struct backing_dev_info *b
        bdi->max_ratio = 100;
        bdi->max_prop_frac = PROP_FRAC_BASE;
        spin_lock_init(&bdi->wb_lock);
-       INIT_RCU_HEAD(&bdi->rcu_head);
        INIT_LIST_HEAD(&bdi->bdi_list);
        INIT_LIST_HEAD(&bdi->wb_list);
        INIT_LIST_HEAD(&bdi->work_list);
  
        bdi_wb_init(&bdi->wb, bdi);
  
 -      /*
 -       * Just one thread support for now, hard code mask and count
 -       */
 -      bdi->wb_mask = 1;
 -      bdi->wb_cnt = 1;
 -
        for (i = 0; i < NR_BDI_STAT_ITEMS; i++) {
                err = percpu_counter_init(&bdi->bdi_stat[i], 0);
                if (err)