]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branch 'core/softlockup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Jul 2008 01:34:13 +0000 (18:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Jul 2008 01:34:13 +0000 (18:34 -0700)
* 'core/softlockup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  softlockup: fix invalid proc_handler for softlockup_panic
  softlockup: fix watchdog task wakeup frequency
  softlockup: fix watchdog task wakeup frequency
  softlockup: show irqtrace
  softlockup: print a module list on being stuck
  softlockup: fix NMI hangs due to lock race - 2.6.26-rc regression
  softlockup: fix false positives on nohz if CPU is 100% idle for more than 60 seconds
  softlockup: fix softlockup_thresh fix
  softlockup: fix softlockup_thresh unaligned access and disable detection at runtime
  softlockup: allow panic on lockup

1  2 
Documentation/kernel-parameters.txt
include/linux/sched.h
kernel/sysctl.c
lib/Kconfig.debug

index 30d44b78171a53e5dcc9e3b42d67266f61975a75,b8451f7714601ba9a8cd992ca2c632a2050b4d1c..47e7d8794fc6fbad46c37edbc1d9a5bc4f6c3e82
@@@ -147,14 -147,10 +147,14 @@@ and is between 256 and 4096 characters
                        default: 0
  
        acpi_sleep=     [HW,ACPI] Sleep options
 -                      Format: { s3_bios, s3_mode, s3_beep }
 +                      Format: { s3_bios, s3_mode, s3_beep, old_ordering }
                        See Documentation/power/video.txt for s3_bios and s3_mode.
                        s3_beep is for debugging; it makes the PC's speaker beep
                        as soon as the kernel's real-mode entry point is called.
 +                      old_ordering causes the ACPI 1.0 ordering of the _PTS
 +                      control method, wrt putting devices into low power
 +                      states, to be enforced (the ACPI 2.0 ordering of _PTS is
 +                      used by default).
  
        acpi_sci=       [HW,ACPI] ACPI System Control Interrupt trigger mode
                        Format: { level | edge | high | low }
                        See Documentation/ide/ide.txt.
  
        idle=           [X86]
 -                      Format: idle=poll or idle=mwait
 +                      Format: idle=poll or idle=mwait, idle=halt, idle=nomwait
                        Poll forces a polling idle loop that can slightly improves the performance
                        of waking up a idle CPU, but will use a lot of power and make the system
                        run hot. Not recommended.
                        to not use it because it doesn't save as much power as a normal idle
                        loop use the MONITOR/MWAIT idle loop anyways. Performance should be the same
                        as idle=poll.
 +                      idle=halt. Halt is forced to be used for CPU idle.
 +                      In such case C2/C3 won't be used again.
 +                      idle=nomwait. Disable mwait for CPU C-states
  
        ide-pci-generic.all-generic-ide [HW] (E)IDE subsystem
                        Claim all unknown PCI IDE storage controllers.
                                 or
                                 memmap=0x10000$0x18690000
  
 -      memtest=        [KNL,X86_64] Enable memtest
 +      memtest=        [KNL,X86] Enable memtest
                        Format: <integer>
                        range: 0,4 : pattern number
                        default : 0 <disable>
                        This usage is only documented in each driver source
                        file if at all.
  
 +      nf_conntrack.acct=
 +                      [NETFILTER] Enable connection tracking flow accounting
 +                      0 to disable accounting
 +                      1 to enable accounting
 +                      Default value depends on CONFIG_NF_CT_ACCT that is
 +                      going to be removed in 2.6.29.
 +
        nfsaddrs=       [NFS]
                        See Documentation/filesystems/nfsroot.txt.
  
                                Use with caution as certain devices share
                                address decoders between ROMs and other
                                resources.
 +              norom           [X86-32,X86_64] Do not assign address space to
 +                              expansion ROMs that do not already have
 +                              BIOS assigned address ranges.
                irqmask=0xMMMM  [X86-32] Set a bit mask of IRQs allowed to be
                                assigned automatically to PCI devices. You can
                                make the kernel exclude IRQs of your ISA cards
  
        snd-ymfpci=     [HW,ALSA]
  
+       softlockup_panic=
+                       [KNL] Should the soft-lockup detector generate panics.
        sonypi.*=       [HW] Sony Programmable I/O Control Device driver
                        See Documentation/sonypi.txt
  
                        Note that genuine overcurrent events won't be
                        reported either.
  
 +      unknown_nmi_panic
 +                      [X86-32,X86-64]
 +                      Set unknown_nmi_panic=1 early on boot.
 +
        usbcore.autosuspend=
                        [USB] The autosuspend time delay (in seconds) used
                        for newly-detected USB devices (default 2).  This
diff --combined include/linux/sched.h
index 1941d8b5cf11cb9731342c5519ac58436e192eab,7b2a356b97fcc1ffddceb256ad016042848bd6b5..af443a08431fc271c2983aa3743709a812025e9a
@@@ -295,10 -295,11 +295,11 @@@ extern void softlockup_tick(void)
  extern void spawn_softlockup_task(void);
  extern void touch_softlockup_watchdog(void);
  extern void touch_all_softlockup_watchdogs(void);
- extern unsigned long  softlockup_thresh;
+ 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)
  {
@@@ -1062,6 -1063,12 +1063,6 @@@ struct task_struct 
  #endif
  
        struct list_head tasks;
 -      /*
 -       * ptrace_list/ptrace_children forms the list of my children
 -       * that were stolen by a ptracer.
 -       */
 -      struct list_head ptrace_children;
 -      struct list_head ptrace_list;
  
        struct mm_struct *mm, *active_mm;
  
        /* 
         * pointers to (original) parent process, youngest child, younger sibling,
         * older sibling, respectively.  (p->father can be replaced with 
 -       * p->parent->pid)
 +       * p->real_parent->pid)
         */
 -      struct task_struct *real_parent; /* real parent process (when being debugged) */
 -      struct task_struct *parent;     /* parent process */
 +      struct task_struct *real_parent; /* real parent process */
 +      struct task_struct *parent; /* recipient of SIGCHLD, wait4() reports */
        /*
 -       * children/sibling forms the list of my children plus the
 -       * tasks I'm ptracing.
 +       * children/sibling forms the list of my natural children
         */
        struct list_head children;      /* list of my children */
        struct list_head sibling;       /* linkage in my parent's children list */
        struct task_struct *group_leader;       /* threadgroup leader */
  
 +      /*
 +       * ptraced is the list of tasks this task is using ptrace on.
 +       * This includes both natural children and PTRACE_ATTACH targets.
 +       * p->ptrace_entry is p's link on the p->parent->ptraced list.
 +       */
 +      struct list_head ptraced;
 +      struct list_head ptrace_entry;
 +
        /* PID/PID hash table linkage. */
        struct pid_link pids[PIDTYPE_MAX];
        struct list_head thread_group;
@@@ -1495,7 -1495,6 +1496,7 @@@ static inline void put_task_struct(stru
  #define PF_MEMPOLICY  0x10000000      /* Non-default NUMA mempolicy */
  #define PF_MUTEX_TESTER       0x20000000      /* Thread belongs to the rt mutex tester */
  #define PF_FREEZER_SKIP       0x40000000      /* Freezer should not count it as freezeable */
 +#define PF_FREEZER_NOSIG 0x80000000   /* Freezer won't send signals to it */
  
  /*
   * Only the _current_ task can read/write to tsk->flags, but other
@@@ -1877,6 -1876,9 +1878,6 @@@ extern void wait_task_inactive(struct t
  #define wait_task_inactive(p) do { } while (0)
  #endif
  
 -#define remove_parent(p)      list_del_init(&(p)->sibling)
 -#define add_parent(p)         list_add_tail(&(p)->sibling,&(p)->parent->children)
 -
  #define next_task(p)  list_entry(rcu_dereference((p)->tasks.next), struct task_struct, tasks)
  
  #define for_each_process(p) \
diff --combined kernel/sysctl.c
index b859e6b5a767541b2b9016b6a8217b7ea595be8c,ab59ac008caf8c11a510e2ebe03d7a9e7ea81ec6..2a7b9d88706b41072e4a8fa7cec9a61d1e1e3381
@@@ -83,17 -83,15 +83,18 @@@ extern int maps_protect
  extern int sysctl_stat_interval;
  extern int latencytop_enabled;
  extern int sysctl_nr_open_min, sysctl_nr_open_max;
 +#ifdef CONFIG_RCU_TORTURE_TEST
 +extern int rcutorture_runnable;
 +#endif /* #ifdef CONFIG_RCU_TORTURE_TEST */
  
  /* Constants used for minimum and  maximum */
- #if defined(CONFIG_DETECT_SOFTLOCKUP) || defined(CONFIG_HIGHMEM)
+ #if defined(CONFIG_HIGHMEM) || defined(CONFIG_DETECT_SOFTLOCKUP)
  static int one = 1;
  #endif
  
  #ifdef CONFIG_DETECT_SOFTLOCKUP
  static int sixty = 60;
+ static int neg_one = -1;
  #endif
  
  #ifdef CONFIG_MMU
@@@ -110,7 -108,7 +111,7 @@@ static int min_percpu_pagelist_fract = 
  
  static int ngroups_max = NGROUPS_MAX;
  
 -#ifdef CONFIG_KMOD
 +#ifdef CONFIG_MODULES
  extern char modprobe_path[];
  #endif
  #ifdef CONFIG_CHR_DEV_SG
@@@ -475,7 -473,7 +476,7 @@@ static struct ctl_table kern_table[] = 
                .proc_handler   = &ftrace_enable_sysctl,
        },
  #endif
 -#ifdef CONFIG_KMOD
 +#ifdef CONFIG_MODULES
        {
                .ctl_name       = KERN_MODPROBE,
                .procname       = "modprobe",
        },
  #endif
  #ifdef CONFIG_DETECT_SOFTLOCKUP
+       {
+               .ctl_name       = CTL_UNNUMBERED,
+               .procname       = "softlockup_panic",
+               .data           = &softlockup_panic,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = &proc_dointvec_minmax,
+               .strategy       = &sysctl_intvec,
+               .extra1         = &zero,
+               .extra2         = &one,
+       },
        {
                .ctl_name       = CTL_UNNUMBERED,
                .procname       = "softlockup_thresh",
                .data           = &softlockup_thresh,
-               .maxlen         = sizeof(unsigned long),
+               .maxlen         = sizeof(int),
                .mode           = 0644,
-               .proc_handler   = &proc_doulongvec_minmax,
+               .proc_handler   = &proc_dointvec_minmax,
                .strategy       = &sysctl_intvec,
-               .extra1         = &one,
+               .extra1         = &neg_one,
                .extra2         = &sixty,
        },
        {
                .child          = key_sysctls,
        },
  #endif
 +#ifdef CONFIG_RCU_TORTURE_TEST
 +      {
 +              .ctl_name       = CTL_UNNUMBERED,
 +              .procname       = "rcutorture_runnable",
 +              .data           = &rcutorture_runnable,
 +              .maxlen         = sizeof(int),
 +              .mode           = 0644,
 +              .proc_handler   = &proc_dointvec,
 +      },
 +#endif
  /*
   * NOTE: do not add new entries to this table unless you have read
   * Documentation/sysctl/ctl_unnumbered.txt
diff --combined lib/Kconfig.debug
index ba106db5a65b2b5fdd7be1821e8bd59af9dd855c,011e00bcfc306919886cb59dba046e1ededec5a7..882c51048993010ae70049f2628deaa552645ddb
@@@ -74,9 -74,6 +74,9 @@@ config DEBUG_F
          debugging files into.  Enable this option to be able to read and
          write to these files.
  
 +        For detailed documentation on the debugfs API, see
 +        Documentation/DocBook/filesystems.
 +
          If unsure, say N.
  
  config HEADERS_CHECK
@@@ -150,7 -147,7 +150,7 @@@ config DETECT_SOFTLOCKU
        help
          Say Y here to enable the kernel to detect "soft lockups",
          which are bugs that cause the kernel to loop in kernel
-         mode for more than 10 seconds, without giving other tasks a
+         mode for more than 60 seconds, without giving other tasks a
          chance to run.
  
          When a soft-lockup is detected, the kernel will print the
           can be detected via the NMI-watchdog, on platforms that
           support it.)
  
+ config BOOTPARAM_SOFTLOCKUP_PANIC
+       bool "Panic (Reboot) On Soft Lockups"
+       depends on DETECT_SOFTLOCKUP
+       help
+         Say Y here to enable the kernel to panic on "soft lockups",
+         which are bugs that cause the kernel to loop in kernel
+         mode for more than 60 seconds, without giving other tasks a
+         chance to run.
+         The panic can be used in combination with panic_timeout,
+         to cause the system to reboot automatically after a
+         lockup has been detected. This feature is useful for
+         high-availability systems that have uptime guarantees and
+         where a lockup must be resolved ASAP.
+         Say N if unsure.
+ config BOOTPARAM_SOFTLOCKUP_PANIC_VALUE
+       int
+       depends on DETECT_SOFTLOCKUP
+       range 0 1
+       default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC
+       default 1 if BOOTPARAM_SOFTLOCKUP_PANIC
  config SCHED_DEBUG
        bool "Collect scheduler debugging info"
        depends on DEBUG_KERNEL && PROC_FS
@@@ -533,34 -554,16 +557,34 @@@ config BOOT_PRINTK_DELA
  config RCU_TORTURE_TEST
        tristate "torture tests for RCU"
        depends on DEBUG_KERNEL
 -      depends on m
        default n
        help
          This option provides a kernel module that runs torture tests
          on the RCU infrastructure.  The kernel module may be built
          after the fact on the running kernel to be tested, if desired.
  
 +        Say Y here if you want RCU torture tests to be built into
 +        the kernel.
          Say M if you want the RCU torture tests to build as a module.
          Say N if you are unsure.
  
 +config RCU_TORTURE_TEST_RUNNABLE
 +      bool "torture tests for RCU runnable by default"
 +      depends on RCU_TORTURE_TEST = y
 +      default n
 +      help
 +        This option provides a way to build the RCU torture tests
 +        directly into the kernel without them starting up at boot
 +        time.  You can use /proc/sys/kernel/rcutorture_runnable
 +        to manually override this setting.  This /proc file is
 +        available only when the RCU torture tests have been built
 +        into the kernel.
 +
 +        Say Y here if you want the RCU torture tests to start during
 +        boot (you probably don't).
 +        Say N here if you want the RCU torture tests to start only
 +        after being manually enabled via /proc.
 +
  config KPROBES_SANITY_TEST
        bool "Kprobes sanity tests"
        depends on DEBUG_KERNEL