]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'linus' into core/softlockup
authorIngo Molnar <mingo@elte.hu>
Tue, 15 Jul 2008 21:12:58 +0000 (23:12 +0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 15 Jul 2008 21:12:58 +0000 (23:12 +0200)
Conflicts:

kernel/softlockup.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>
1  2 
Documentation/kernel-parameters.txt
include/linux/sched.h
kernel/sysctl.c
kernel/time/tick-sched.c
lib/Kconfig.debug

index 042588fa12e5c3a2bf4657bfdf7c255bc6ac58c6,312fe77764a48cba9fb04e000fc2dffeba7fa978..b8451f7714601ba9a8cd992ca2c632a2050b4d1c
@@@ -271,6 -271,17 +271,17 @@@ and is between 256 and 4096 characters
        aic79xx=        [HW,SCSI]
                        See Documentation/scsi/aic79xx.txt.
  
+       amd_iommu=      [HW,X86-84]
+                       Pass parameters to the AMD IOMMU driver in the system.
+                       Possible values are:
+                       isolate - enable device isolation (each device, as far
+                                 as possible, will get its own protection
+                                 domain)
+       amd_iommu_size= [HW,X86-64]
+                       Define the size of the aperture for the AMD IOMMU
+                       driver. Possible values are:
+                       '32M', '64M' (default), '128M', '256M', '512M', '1G'
        amijoy.map=     [HW,JOY] Amiga joystick support
                        Map of devices attached to JOY0DAT and JOY1DAT
                        Format: <a>,<b>
                        when initialising the APIC and IO-APIC components.
  
        apm=            [APM] Advanced Power Management
-                       See header of arch/i386/kernel/apm.c.
+                       See header of arch/x86/kernel/apm_32.c.
  
        arcrimi=        [HW,NET] ARCnet - "RIM I" (entirely mem-mapped) cards
                        Format: <io>,<irq>,<nodeID>
  
        debug_objects   [KNL] Enable object debugging
  
+       debugpat        [X86] Enable PAT debugging
        decnet.addr=    [HW,NET]
                        Format: <area>[,<node>]
                        See also Documentation/networking/decnet.txt.
                        See drivers/char/README.epca and
                        Documentation/digiepca.txt.
  
+       disable_mtrr_cleanup [X86]
+       enable_mtrr_cleanup [X86]
+                       The kernel tries to adjust MTRR layout from continuous
+                       to discrete, to make X server driver able to add WB
+                       entry later. This parameter enables/disables that.
+       mtrr_chunk_size=nn[KMG] [X86]
+                       used for mtrr cleanup. It is largest continous chunk
+                       that could hold holes aka. UC entries.
+       mtrr_gran_size=nn[KMG] [X86]
+                       Used for mtrr cleanup. It is granularity of mtrr block.
+                       Default is 1.
+                       Large value could prevent small alignment from
+                       using up MTRRs.
+       mtrr_spare_reg_nr=n [X86]
+                       Format: <integer>
+                       Range: 0,7 : spare reg number
+                       Default : 1
+                       Used for mtrr cleanup. It is spare mtrr entries number.
+                       Set to 2 or more if your graphical card needs more.
        disable_mtrr_trim [X86, Intel and AMD only]
                        By default the kernel will trim any uncacheable
                        memory out of your available memory pool based on
  
        elanfreq=       [X86-32]
                        See comment before function elanfreq_setup() in
-                       arch/i386/kernel/cpu/cpufreq/elanfreq.c.
+                       arch/x86/kernel/cpu/cpufreq/elanfreq.c.
  
        elevator=       [IOSCHED]
                        Format: {"anticipatory" | "cfq" | "deadline" | "noop"}
        hd=             [EIDE] (E)IDE hard drive subsystem geometry
                        Format: <cyl>,<head>,<sect>
  
-       hd?=            [HW] (E)IDE subsystem
-       hd?lun=         See Documentation/ide/ide.txt.
        highmem=nn[KMG] [KNL,BOOT] forces the highmem zone to have an exact
                        size of <nn>. This works even on boxes that have no
                        highmem otherwise. This also works to reduce highmem
        mtdparts=       [MTD]
                        See drivers/mtd/cmdlinepart.c.
  
+       mtdset=         [ARM]
+                       ARM/S3C2412 JIVE boot control
+                       See arch/arm/mach-s3c2412/mach-jive.c
        mtouchusb.raw_coordinates=
                        [HW] Make the MicroTouch USB driver use raw coordinates
                        ('y', default) or cooked coordinates ('n')
                        Format: { parport<nr> | timid | 0 }
                        See also Documentation/parport.txt.
  
+       pmtmr=          [X86] Manual setup of pmtmr I/O Port. 
+                       Override pmtimer IOPort with a hex value.
+                       e.g. pmtmr=0x508
        pnpacpi=        [ACPI]
                        { off }
  
                        Format: <reboot_mode>[,<reboot_mode2>[,...]]
                        See arch/*/kernel/reboot.c or arch/*/kernel/process.c                   
  
+       relax_domain_level=
+                       [KNL, SMP] Set scheduler's default relax_domain_level.
+                       See Documentation/cpusets.txt.
        reserve=        [KNL,BUGS] Force the kernel to ignore some iomem area
  
        reservetop=     [X86-32]
  
        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
  
        usbhid.mousepoll=
                        [USBHID] The interval which mice are to be polled at.
  
+       add_efi_memmap  [EFI; x86-32,X86-64] Include EFI memory map in
+                       kernel's map of available physical RAM.
        vdso=           [X86-32,SH,x86-64]
                        vdso=2: enable compat VDSO (default with COMPAT_VDSO)
                        vdso=1: enable VDSO (default)
diff --combined include/linux/sched.h
index 69760a379b6dc5747703cfb7c9ed818ea8ffb841,21349173d148034cb20bf6f3d987ac9b0a9310cf..7b2a356b97fcc1ffddceb256ad016042848bd6b5
@@@ -134,7 -134,6 +134,6 @@@ extern unsigned long nr_running(void)
  extern unsigned long nr_uninterruptible(void);
  extern unsigned long nr_active(void);
  extern unsigned long nr_iowait(void);
- extern unsigned long weighted_cpuload(const int cpu);
  
  struct seq_file;
  struct cfs_rq;
@@@ -246,6 -245,8 +245,8 @@@ extern asmlinkage void schedule_tail(st
  extern void init_idle(struct task_struct *idle, int cpu);
  extern void init_idle_bootup_task(struct task_struct *idle);
  
+ extern int runqueue_is_locked(void);
  extern cpumask_t nohz_cpu_mask;
  #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ)
  extern int select_nohz_load_balancer(int cpu);
@@@ -294,11 -295,10 +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)
  {
@@@ -785,6 -785,8 +786,8 @@@ struct sched_domain 
        unsigned int balance_interval;  /* initialise to 1. units in ms. */
        unsigned int nr_balance_failed; /* initialise to 0 */
  
+       u64 last_update;
  #ifdef CONFIG_SCHEDSTATS
        /* load_balance() stats */
        unsigned int lb_count[CPU_MAX_IDLE_TYPES];
@@@ -824,23 -826,6 +827,6 @@@ extern int arch_reinit_sched_domains(vo
  
  #endif        /* CONFIG_SMP */
  
- /*
-  * A runqueue laden with a single nice 0 task scores a weighted_cpuload of
-  * SCHED_LOAD_SCALE. This function returns 1 if any cpu is laden with a
-  * task of nice 0 or enough lower priority tasks to bring up the
-  * weighted_cpuload
-  */
- static inline int above_background_load(void)
- {
-       unsigned long cpu;
-       for_each_online_cpu(cpu) {
-               if (weighted_cpuload(cpu) >= SCHED_LOAD_SCALE)
-                       return 1;
-       }
-       return 0;
- }
  struct io_context;                    /* See blkdev.h */
  #define NGROUPS_SMALL         32
  #define NGROUPS_PER_BLOCK     ((unsigned int)(PAGE_SIZE / sizeof(gid_t)))
@@@ -922,8 -907,8 +908,8 @@@ struct sched_class 
        void (*set_cpus_allowed)(struct task_struct *p,
                                 const cpumask_t *newmask);
  
-       void (*join_domain)(struct rq *rq);
-       void (*leave_domain)(struct rq *rq);
+       void (*rq_online)(struct rq *rq);
+       void (*rq_offline)(struct rq *rq);
  
        void (*switched_from) (struct rq *this_rq, struct task_struct *task,
                               int running);
@@@ -1040,6 -1025,7 +1026,7 @@@ struct task_struct 
  #endif
  
        int prio, static_prio, normal_prio;
+       unsigned int rt_priority;
        const struct sched_class *sched_class;
        struct sched_entity se;
        struct sched_rt_entity rt;
        int __user *set_child_tid;              /* CLONE_CHILD_SETTID */
        int __user *clear_child_tid;            /* CLONE_CHILD_CLEARTID */
  
-       unsigned int rt_priority;
        cputime_t utime, stime, utimescaled, stimescaled;
        cputime_t gtime;
        cputime_t prev_utime, prev_stime;
        gid_t gid,egid,sgid,fsgid;
        struct group_info *group_info;
        kernel_cap_t   cap_effective, cap_inheritable, cap_permitted, cap_bset;
-       unsigned securebits;
        struct user_struct *user;
+       unsigned securebits;
  #ifdef CONFIG_KEYS
+       unsigned char jit_keyring;      /* default keyring to attach requested keys to */
        struct key *request_key_auth;   /* assumed request_key authority */
        struct key *thread_keyring;     /* keyring private to this thread */
-       unsigned char jit_keyring;      /* default keyring to attach requested keys to */
  #endif
        char comm[TASK_COMM_LEN]; /* executable name excluding path
                                     - access with [gs]et_task_comm (which lock
  # define MAX_LOCK_DEPTH 48UL
        u64 curr_chain_key;
        int lockdep_depth;
-       struct held_lock held_locks[MAX_LOCK_DEPTH];
        unsigned int lockdep_recursion;
+       struct held_lock held_locks[MAX_LOCK_DEPTH];
  #endif
  
  /* journalling filesystem info */
        u64 acct_vm_mem1;       /* accumulated virtual memory usage */
        cputime_t acct_stimexpd;/* stime since last update */
  #endif
- #ifdef CONFIG_NUMA
-       struct mempolicy *mempolicy;
-       short il_next;
- #endif
  #ifdef CONFIG_CPUSETS
        nodemask_t mems_allowed;
        int cpuset_mems_generation;
  #endif
        struct list_head pi_state_list;
        struct futex_pi_state *pi_state_cache;
+ #endif
+ #ifdef CONFIG_NUMA
+       struct mempolicy *mempolicy;
+       short il_next;
  #endif
        atomic_t fs_excl;       /* holding fs exclusive resources */
        struct rcu_head rcu;
@@@ -1505,6 -1490,7 +1491,7 @@@ static inline void put_task_struct(stru
  #define PF_SWAPWRITE  0x00800000      /* Allowed to write to swap */
  #define PF_SPREAD_PAGE        0x01000000      /* Spread page cache over cpuset */
  #define PF_SPREAD_SLAB        0x02000000      /* Spread some slab caches over cpuset */
+ #define PF_THREAD_BOUND       0x04000000      /* Thread bound to specific cpu */
  #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 */
@@@ -1574,13 -1560,28 +1561,28 @@@ static inline void sched_clock_idle_sle
  static inline void sched_clock_idle_wakeup_event(u64 delta_ns)
  {
  }
- #else
+ #ifdef CONFIG_NO_HZ
+ static inline void sched_clock_tick_stop(int cpu)
+ {
+ }
+ static inline void sched_clock_tick_start(int cpu)
+ {
+ }
+ #endif
+ #else /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */
  extern void sched_clock_init(void);
  extern u64 sched_clock_cpu(int cpu);
  extern void sched_clock_tick(void);
  extern void sched_clock_idle_sleep_event(void);
  extern void sched_clock_idle_wakeup_event(u64 delta_ns);
+ #ifdef CONFIG_NO_HZ
+ extern void sched_clock_tick_stop(int cpu);
+ extern void sched_clock_tick_start(int cpu);
  #endif
+ #endif /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */
  
  /*
   * For kernel-internal use: high-speed (but slightly incorrect) per-cpu
@@@ -1623,6 -1624,7 +1625,7 @@@ extern unsigned int sysctl_sched_child_
  extern unsigned int sysctl_sched_features;
  extern unsigned int sysctl_sched_migration_cost;
  extern unsigned int sysctl_sched_nr_migrate;
+ extern unsigned int sysctl_sched_shares_ratelimit;
  
  int sched_nr_latency_handler(struct ctl_table *table, int write,
                struct file *file, void __user *buffer, size_t *length,
@@@ -1656,6 -1658,8 +1659,8 @@@ extern int can_nice(const struct task_s
  extern int task_curr(const struct task_struct *p);
  extern int idle_cpu(int cpu);
  extern int sched_setscheduler(struct task_struct *, int, struct sched_param *);
+ extern int sched_setscheduler_nocheck(struct task_struct *, int,
+                                     struct sched_param *);
  extern struct task_struct *idle_task(int cpu);
  extern struct task_struct *curr_task(int cpu);
  extern void set_curr_task(int cpu, struct task_struct *p);
@@@ -2132,6 -2136,18 +2137,18 @@@ static inline void arch_pick_mmap_layou
  }
  #endif
  
+ #ifdef CONFIG_TRACING
+ extern void
+ __trace_special(void *__tr, void *__data,
+               unsigned long arg1, unsigned long arg2, unsigned long arg3);
+ #else
+ static inline void
+ __trace_special(void *__tr, void *__data,
+               unsigned long arg1, unsigned long arg2, unsigned long arg3)
+ {
+ }
+ #endif
  extern long sched_setaffinity(pid_t pid, const cpumask_t *new_mask);
  extern long sched_getaffinity(pid_t pid, cpumask_t *mask);
  
@@@ -2226,6 -2242,8 +2243,8 @@@ static inline void mm_init_owner(struc
  }
  #endif /* CONFIG_MM_OWNER */
  
+ #define TASK_STATE_TO_CHAR_STR "RSDTtZX"
  #endif /* __KERNEL__ */
  
  #endif
diff --combined kernel/sysctl.c
index a829dc8d7a9ec0d6340349c11f883fe2c785ebb5,0d562d6531ebc7b394e2552bfe8806d2e0b40aae..3e56d2f914143a46862ced7a118cd5db243c9465
@@@ -46,6 -46,7 +46,7 @@@
  #include <linux/nfs_fs.h>
  #include <linux/acpi.h>
  #include <linux/reboot.h>
+ #include <linux/ftrace.h>
  
  #include <asm/uaccess.h>
  #include <asm/processor.h>
@@@ -84,13 -85,12 +85,13 @@@ extern int latencytop_enabled
  extern int sysctl_nr_open_min, sysctl_nr_open_max;
  
  /* 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
@@@ -133,8 -133,6 +134,6 @@@ extern int sysctl_userprocess_debug
  extern int spin_retry;
  #endif
  
- extern int sysctl_hz_timer;
  #ifdef CONFIG_BSD_PROCESS_ACCT
  extern int acct_parm[];
  #endif
@@@ -265,6 -263,14 +264,14 @@@ static struct ctl_table kern_table[] = 
                .extra1         = &min_wakeup_granularity_ns,
                .extra2         = &max_wakeup_granularity_ns,
        },
+       {
+               .ctl_name       = CTL_UNNUMBERED,
+               .procname       = "sched_shares_ratelimit",
+               .data           = &sysctl_sched_shares_ratelimit,
+               .maxlen         = sizeof(unsigned int),
+               .mode           = 0644,
+               .proc_handler   = &proc_dointvec,
+       },
        {
                .ctl_name       = CTL_UNNUMBERED,
                .procname       = "sched_child_runs_first",
                .mode           = 0644,
                .proc_handler   = &proc_dointvec,
        },
+ #ifdef CONFIG_FTRACE
+       {
+               .ctl_name       = CTL_UNNUMBERED,
+               .procname       = "ftrace_enabled",
+               .data           = &ftrace_enabled,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = &ftrace_enable_sysctl,
+       },
+ #endif
  #ifdef CONFIG_KMOD
        {
                .ctl_name       = KERN_MODPROBE,
                .mode           = 0644,
                .proc_handler   = &proc_dointvec,
        },
- #endif
- #ifdef CONFIG_NO_IDLE_HZ
-       {
-               .ctl_name       = KERN_HZ_TIMER,
-               .procname       = "hz_timer",
-               .data           = &sysctl_hz_timer,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec,
-       },
  #endif
        {
                .ctl_name       = KERN_S390_USER_DEBUG_LOGGING,
        },
  #endif
  #ifdef CONFIG_DETECT_SOFTLOCKUP
 +      {
 +              .ctl_name       = CTL_UNNUMBERED,
 +              .procname       = "softlockup_panic",
 +              .data           = &softlockup_panic,
 +              .maxlen         = sizeof(int),
 +              .mode           = 0644,
 +              .proc_handler   = &proc_doulongvec_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,
        },
        {
diff --combined kernel/time/tick-sched.c
index 28abad66fc8e56ade236e07d94d08ef29534786e,beef7ccdf842f3cea9994c19b879baa06f3e94f5..942fc7c85283af6592eefc8b8c4baa028bb13c1f
@@@ -48,6 -48,13 +48,13 @@@ static void tick_do_update_jiffies64(kt
        unsigned long ticks = 0;
        ktime_t delta;
  
+       /*
+        * Do a quick check without holding xtime_lock:
+        */
+       delta = ktime_sub(now, last_jiffies_update);
+       if (delta.tv64 < tick_period.tv64)
+               return;
        /* Reevalute with xtime_lock held */
        write_seqlock(&xtime_lock);
  
@@@ -133,6 -140,8 +140,6 @@@ void tick_nohz_update_jiffies(void
        if (!ts->tick_stopped)
                return;
  
 -      touch_softlockup_watchdog();
 -
        cpu_clear(cpu, nohz_cpu_mask);
        now = ktime_get();
        ts->idle_waketime = now;
        local_irq_save(flags);
        tick_do_update_jiffies64(now);
        local_irq_restore(flags);
 +
 +      touch_softlockup_watchdog();
  }
  
  void tick_nohz_stop_idle(int cpu)
@@@ -228,6 -235,7 +235,7 @@@ void tick_nohz_stop_sched_tick(void
                               local_softirq_pending());
                        ratelimit++;
                }
+               goto end;
        }
  
        ts->idle_calls++;
                        ts->tick_stopped = 1;
                        ts->idle_jiffies = last_jiffies;
                        rcu_enter_nohz();
+                       sched_clock_tick_stop(cpu);
                }
  
                /*
@@@ -375,6 -384,7 +384,7 @@@ void tick_nohz_restart_sched_tick(void
        select_nohz_load_balancer(0);
        now = ktime_get();
        tick_do_update_jiffies64(now);
+       sched_clock_tick_start(cpu);
        cpu_clear(cpu, nohz_cpu_mask);
  
        /*
diff --combined lib/Kconfig.debug
index 509ae35a9ef5c71371e5c86451bf59ec45953227,c459e8547bd8cd11ede47e50f44e055fa1d06a6b..011e00bcfc306919886cb59dba046e1ededec5a7
@@@ -147,7 -147,7 +147,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
@@@ -443,7 -419,6 +443,6 @@@ config DEBUG_LOCKING_API_SELFTEST
  
  config STACKTRACE
        bool
-       depends on DEBUG_KERNEL
        depends on STACKTRACE_SUPPORT
  
  config DEBUG_KOBJECT
@@@ -587,6 -562,9 +586,9 @@@ config BACKTRACE_SELF_TES
          for distributions or general kernels, but only for kernel
          developers working on architecture code.
  
+         Note that if you want to also test saved backtraces, you will
+         have to enable STACKTRACE as well.
          Say N if you are unsure.
  
  config LKDTM
@@@ -658,6 -636,8 +660,8 @@@ config LATENCYTO
          Enable this option if you want to use the LatencyTOP tool
          to find out which userspace is blocking on what kernel operations.
  
+ source kernel/trace/Kconfig
  config PROVIDE_OHCI1394_DMA_INIT
        bool "Remote debugging over FireWire early on boot"
        depends on PCI && X86