]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'core/softlockup' of git://git.kernel.org/pub/scm/linux/kernel/git/tip...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 7 Apr 2009 21:11:07 +0000 (14:11 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 7 Apr 2009 21:11:07 +0000 (14:11 -0700)
* 'core/softlockup' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  softlockup: make DETECT_HUNG_TASK default depend on DETECT_SOFTLOCKUP
  softlockup: move 'one' to the softlockup section in sysctl.c
  softlockup: ensure the task has been switched out once
  softlockup: remove timestamp checking from hung_task
  softlockup: convert read_lock in hung_task to rcu_read_lock
  softlockup: check all tasks in hung_task
  softlockup: remove unused definition for spawn_softlockup_task
  softlockup: fix potential race in hung_task when resetting timeout
  softlockup: fix to allow compiling with !DETECT_HUNG_TASK
  softlockup: decouple hung tasks check from softlockup detection

1  2 
include/linux/sched.h
kernel/sysctl.c

diff --combined include/linux/sched.h
index c96140210d1c4286cdd249e936e07e103689cbd3,763b525227dc022100a926a1ace40f4ec078e009..98e1fe51601df0066786500ba78e0648ec896287
@@@ -300,17 -300,11 +300,11 @@@ extern int proc_dosoftlockup_thresh(str
                                    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;
- extern unsigned long sysctl_hung_task_warnings;
  extern int softlockup_thresh;
  #else
  static inline void softlockup_tick(void)
  {
  }
- static inline void spawn_softlockup_task(void)
- {
- }
  static inline void touch_softlockup_watchdog(void)
  {
  }
@@@ -319,6 -313,15 +313,15 @@@ static inline void touch_all_softlockup
  }
  #endif
  
+ #ifdef CONFIG_DETECT_HUNG_TASK
+ extern unsigned int  sysctl_hung_task_panic;
+ extern unsigned long sysctl_hung_task_check_count;
+ extern unsigned long sysctl_hung_task_timeout_secs;
+ extern unsigned long sysctl_hung_task_warnings;
+ extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
+                                        struct file *filp, void __user *buffer,
+                                        size_t *lenp, loff_t *ppos);
+ #endif
  
  /* Attach to any functions which should be ignored in wchan output. */
  #define __sched               __attribute__((__section__(".sched.text")))
@@@ -1255,9 -1258,8 +1258,8 @@@ struct task_struct 
  /* ipc stuff */
        struct sysv_sem sysvsem;
  #endif
- #ifdef CONFIG_DETECT_SOFTLOCKUP
+ #ifdef CONFIG_DETECT_HUNG_TASK
  /* hung task detection */
-       unsigned long last_switch_timestamp;
        unsigned long last_switch_count;
  #endif
  /* CPU-specific state of this task */
  /* Protection of (de-)allocation: mm, files, fs, tty, keyrings */
        spinlock_t alloc_lock;
  
 +#ifdef CONFIG_GENERIC_HARDIRQS
 +      /* IRQ handler threads */
 +      struct irqaction *irqaction;
 +#endif
 +
        /* Protection of the PI data structures: */
        spinlock_t pi_lock;
  
diff --combined kernel/sysctl.c
index 72eb1a41dcabef2a7d46ab7199cae10edcc3aa5c,b1a1b968f7456bafab7ce35a06b473abf917ea43..4286b62b34a0a2d0f9a00f96ae2e8822647238bf
@@@ -101,7 -101,6 +101,7 @@@ static int __maybe_unused one = 1
  static int __maybe_unused two = 2;
  static unsigned long one_ul = 1;
  static int one_hundred = 100;
 +static int one_thousand = 1000;
  
  /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */
  static int maxolduid = 65535;
@@@ -814,6 -813,19 +814,19 @@@ static struct ctl_table kern_table[] = 
                .extra1         = &neg_one,
                .extra2         = &sixty,
        },
+ #endif
+ #ifdef CONFIG_DETECT_HUNG_TASK
+       {
+               .ctl_name       = CTL_UNNUMBERED,
+               .procname       = "hung_task_panic",
+               .data           = &sysctl_hung_task_panic,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = &proc_dointvec_minmax,
+               .strategy       = &sysctl_intvec,
+               .extra1         = &zero,
+               .extra2         = &one,
+       },
        {
                .ctl_name       = CTL_UNNUMBERED,
                .procname       = "hung_task_check_count",
                .data           = &sysctl_hung_task_timeout_secs,
                .maxlen         = sizeof(unsigned long),
                .mode           = 0644,
-               .proc_handler   = &proc_doulongvec_minmax,
+               .proc_handler   = &proc_dohung_task_timeout_secs,
                .strategy       = &sysctl_intvec,
        },
        {
@@@ -1027,28 -1039,6 +1040,28 @@@ static struct ctl_table vm_table[] = 
                .mode           = 0444 /* read-only*/,
                .proc_handler   = &proc_dointvec,
        },
 +      {
 +              .ctl_name       = CTL_UNNUMBERED,
 +              .procname       = "nr_pdflush_threads_min",
 +              .data           = &nr_pdflush_threads_min,
 +              .maxlen         = sizeof nr_pdflush_threads_min,
 +              .mode           = 0644 /* read-write */,
 +              .proc_handler   = &proc_dointvec_minmax,
 +              .strategy       = &sysctl_intvec,
 +              .extra1         = &one,
 +              .extra2         = &nr_pdflush_threads_max,
 +      },
 +      {
 +              .ctl_name       = CTL_UNNUMBERED,
 +              .procname       = "nr_pdflush_threads_max",
 +              .data           = &nr_pdflush_threads_max,
 +              .maxlen         = sizeof nr_pdflush_threads_max,
 +              .mode           = 0644 /* read-write */,
 +              .proc_handler   = &proc_dointvec_minmax,
 +              .strategy       = &sysctl_intvec,
 +              .extra1         = &nr_pdflush_threads_min,
 +              .extra2         = &one_thousand,
 +      },
        {
                .ctl_name       = VM_SWAPPINESS,
                .procname       = "swappiness",