]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 26 Jan 2009 17:47:56 +0000 (09:47 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 26 Jan 2009 17:47:56 +0000 (09:47 -0800)
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  debugobjects: add and use INIT_WORK_ON_STACK
  rcu: remove duplicate CONFIG_RCU_CPU_STALL_DETECTOR
  relay: fix lock imbalance in relay_late_setup_files
  oprofile: fix uninitialized use of struct op_entry
  rcu: move Kconfig menu
  softlock: fix false panic which can occur if softlockup_thresh is reduced
  rcu: add __cpuinit to rcu_init_percpu_data()

1  2 
include/linux/sched.h
include/linux/workqueue.h
lib/Kconfig.debug

diff --combined include/linux/sched.h
index c20943eabb4c94b13d3ca70de00ad8550548b39d,54cbabf3b87196cd30449205b9597d0ecaa7c40c..02e16d2073042857e8f59565e2848c9821818744
@@@ -293,6 -293,9 +293,9 @@@ extern void sched_show_task(struct task
  extern void softlockup_tick(void);
  extern void touch_softlockup_watchdog(void);
  extern void touch_all_softlockup_watchdogs(void);
+ extern int proc_dosoftlockup_thresh(struct ctl_table *table, int write,
+                                   struct file *filp, void __user *buffer,
+                                   size_t *lenp, loff_t *ppos);
  extern unsigned int  softlockup_panic;
  extern unsigned long sysctl_hung_task_check_count;
  extern unsigned long sysctl_hung_task_timeout_secs;
@@@ -450,7 -453,6 +453,7 @@@ struct task_cputime 
        cputime_t utime;
        cputime_t stime;
        unsigned long long sum_exec_runtime;
 +      spinlock_t lock;
  };
  /* Alternate field names when used to cache expirations. */
  #define prof_exp      stime
   * used for thread group CPU clock calculations.
   */
  struct thread_group_cputime {
 -      struct task_cputime *totals;
 +      struct task_cputime totals;
  };
  
  /*
@@@ -2181,30 -2183,24 +2184,30 @@@ static inline int spin_needbreak(spinlo
   * Thread group CPU time accounting.
   */
  
 -extern int thread_group_cputime_alloc(struct task_struct *);
 -extern void thread_group_cputime(struct task_struct *, struct task_cputime *);
 -
 -static inline void thread_group_cputime_init(struct signal_struct *sig)
 +static inline
 +void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times)
  {
 -      sig->cputime.totals = NULL;
 +      struct task_cputime *totals = &tsk->signal->cputime.totals;
 +      unsigned long flags;
 +
 +      spin_lock_irqsave(&totals->lock, flags);
 +      *times = *totals;
 +      spin_unlock_irqrestore(&totals->lock, flags);
  }
  
 -static inline int thread_group_cputime_clone_thread(struct task_struct *curr)
 +static inline void thread_group_cputime_init(struct signal_struct *sig)
  {
 -      if (curr->signal->cputime.totals)
 -              return 0;
 -      return thread_group_cputime_alloc(curr);
 +      sig->cputime.totals = (struct task_cputime){
 +              .utime = cputime_zero,
 +              .stime = cputime_zero,
 +              .sum_exec_runtime = 0,
 +      };
 +
 +      spin_lock_init(&sig->cputime.totals.lock);
  }
  
  static inline void thread_group_cputime_free(struct signal_struct *sig)
  {
 -      free_percpu(sig->cputime.totals);
  }
  
  /*
index 47151c8495aa87af42fd32b1c5c269af62f19dd4,20b59eb1facd55fb373e04f5ab39147d73327be7..3cd51e579ab1c2cddd3960e1154b9c493794a85b
@@@ -118,18 -118,18 +118,24 @@@ struct execute_work 
                init_timer(&(_work)->timer);                    \
        } while (0)
  
 +#define INIT_DELAYED_WORK_ON_STACK(_work, _func)              \
 +      do {                                                    \
 +              INIT_WORK(&(_work)->work, (_func));             \
 +              init_timer_on_stack(&(_work)->timer);           \
 +      } while (0)
 +
  #define INIT_DELAYED_WORK_DEFERRABLE(_work, _func)                    \
        do {                                                    \
                INIT_WORK(&(_work)->work, (_func));             \
                init_timer_deferrable(&(_work)->timer);         \
        } while (0)
  
+ #define INIT_DELAYED_WORK_ON_STACK(_work, _func)              \
+       do {                                                    \
+               INIT_WORK(&(_work)->work, (_func));             \
+               init_timer_on_stack(&(_work)->timer);           \
+       } while (0)
  /**
   * work_pending - Find out whether a work item is currently pending
   * @work: The work item in question
diff --combined lib/Kconfig.debug
index d30561dda907a1015f96160398115dba120e3349,e770e85f76c7e2ca06030e5a2f9d315515c3c6de..29044f500269c3b9ad9b834adc21a77557ac897b
@@@ -570,15 -570,6 +570,15 @@@ config DEBUG_NOTIFIER
          This is a relatively cheap check but if you care about maximum
          performance, say N.
  
 +#
 +# Select this config option from the architecture Kconfig, if it
 +# it is preferred to always offer frame pointers as a config
 +# option on the architecture (regardless of KERNEL_DEBUG):
 +#
 +config ARCH_WANT_FRAME_POINTERS
 +      bool
 +      help
 +
  config FRAME_POINTER
        bool "Compile the kernel with frame pointers"
        depends on DEBUG_KERNEL && \
@@@ -640,19 -631,6 +640,6 @@@ config RCU_TORTURE_TEST_RUNNABL
          Say N here if you want the RCU torture tests to start only
          after being manually enabled via /proc.
  
- config RCU_CPU_STALL_DETECTOR
-       bool "Check for stalled CPUs delaying RCU grace periods"
-       depends on CLASSIC_RCU
-       default n
-       help
-         This option causes RCU to printk information on which
-         CPUs are delaying the current grace period, but only when
-         the grace period extends for excessive time periods.
-         Say Y if you want RCU to perform such checks.
-         Say N if you are unsure.
  config RCU_CPU_STALL_DETECTOR
        bool "Check for stalled CPUs delaying RCU grace periods"
        depends on CLASSIC_RCU || TREE_RCU