Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 12 Nov 2013 01:20:12 +0000 (10:20 +0900)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 12 Nov 2013 01:20:12 +0000 (10:20 +0900)
Pull scheduler changes from Ingo Molnar:
 "The main changes in this cycle are:

   - (much) improved CONFIG_NUMA_BALANCING support from Mel Gorman, Rik
     van Riel, Peter Zijlstra et al.  Yay!

   - optimize preemption counter handling: merge the NEED_RESCHED flag
     into the preempt_count variable, by Peter Zijlstra.

   - wait.h fixes and code reorganization from Peter Zijlstra

   - cfs_bandwidth fixes from Ben Segall

   - SMP load-balancer cleanups from Peter Zijstra

   - idle balancer improvements from Jason Low

   - other fixes and cleanups"

* 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (129 commits)
  ftrace, sched: Add TRACE_FLAG_PREEMPT_RESCHED
  stop_machine: Fix race between stop_two_cpus() and stop_cpus()
  sched: Remove unnecessary iteration over sched domains to update nr_busy_cpus
  sched: Fix asymmetric scheduling for POWER7
  sched: Move completion code from core.c to completion.c
  sched: Move wait code from core.c to wait.c
  sched: Move wait.c into kernel/sched/
  sched/wait: Fix __wait_event_interruptible_lock_irq_timeout()
  sched: Avoid throttle_cfs_rq() racing with period_timer stopping
  sched: Guarantee new group-entities always have weight
  sched: Fix hrtimer_cancel()/rq->lock deadlock
  sched: Fix cfs_bandwidth misuse of hrtimer_expires_remaining
  sched: Fix race on toggling cfs_bandwidth_used
  sched: Remove extra put_online_cpus() inside sched_setaffinity()
  sched/rt: Fix task_tick_rt() comment
  sched/wait: Fix build breakage
  sched/wait: Introduce prepare_to_wait_event()
  sched/wait: Add ___wait_cond_timeout() to wait_event*_timeout() too
  sched: Remove get_online_cpus() usage
  sched: Fix race in migrate_swap_stop()
  ...

1  2 
MAINTAINERS
arch/x86/kernel/entry_64.S
arch/x86/kernel/irq_32.c
include/linux/tty.h
kernel/Makefile
kernel/fork.c
kernel/rcu/tree.c
kernel/softirq.c
kernel/sysctl.c

diff --combined MAINTAINERS
@@@ -763,10 -763,6 +763,10 @@@ W:       http://maxim.org.za/at91_26.htm
  W:    http://www.linux4sam.org
  S:    Supported
  F:    arch/arm/mach-at91/
 +F:    arch/arm/boot/dts/at91*.dts
 +F:    arch/arm/boot/dts/at91*.dtsi
 +F:    arch/arm/boot/dts/sama*.dts
 +F:    arch/arm/boot/dts/sama*.dtsi
  
  ARM/CALXEDA HIGHBANK ARCHITECTURE
  M:    Rob Herring <rob.herring@calxeda.com>
@@@ -933,7 -929,7 +933,7 @@@ M: Javier Martinez Canillas <javier@dow
  L:    linux-omap@vger.kernel.org
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
 -F:    arch/arm/mach-omap2/board-igep0020.c
 +F:    arch/arm/boot/dts/omap3-igep*
  
  ARM/INCOME PXA270 SUPPORT
  M:    Marek Vasut <marek.vasut@gmail.com>
@@@ -1161,6 -1157,11 +1161,6 @@@ S:     Maintaine
  F:    arch/arm/mach-rockchip/
  F:    drivers/*/*rockchip*
  
 -ARM/SHARK MACHINE SUPPORT
 -M:    Alexander Schulz <alex@shark-linux.de>
 -W:    http://www.shark-linux.de/shark.html
 -S:    Maintained
 -
  ARM/SAMSUNG ARM ARCHITECTURES
  M:    Ben Dooks <ben-linux@fluff.org>
  M:    Kukjin Kim <kgene.kim@samsung.com>
@@@ -1168,8 -1169,6 +1168,8 @@@ L:      linux-arm-kernel@lists.infradead.or
  L:    linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
  W:    http://www.fluff.org/ben/linux/
  S:    Maintained
 +F:    arch/arm/boot/dts/s3c*
 +F:    arch/arm/boot/dts/exynos*
  F:    arch/arm/plat-samsung/
  F:    arch/arm/mach-s3c24*/
  F:    arch/arm/mach-s3c64xx/
@@@ -3692,14 -3691,6 +3692,14 @@@ S:    Maintaine
  F:    include/asm-generic/
  F:    include/uapi/asm-generic/
  
 +GENERIC PHY FRAMEWORK
 +M:    Kishon Vijay Abraham I <kishon@ti.com>
 +L:    linux-kernel@vger.kernel.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git
 +S:    Supported
 +F:    drivers/phy/
 +F:    include/linux/phy/
 +
  GENERIC UIO DRIVER FOR PCI DEVICES
  M:    "Michael S. Tsirkin" <mst@redhat.com>
  L:    kvm@vger.kernel.org
@@@ -4241,7 -4232,7 +4241,7 @@@ S:      Maintaine
  F:    drivers/media/rc/iguanair.c
  
  IIO SUBSYSTEM AND DRIVERS
 -M:    Jonathan Cameron <jic23@cam.ac.uk>
 +M:    Jonathan Cameron <jic23@kernel.org>
  L:    linux-iio@vger.kernel.org
  S:    Maintained
  F:    drivers/iio/
@@@ -4778,13 -4769,6 +4778,13 @@@ S:    Maintaine
  F:    Documentation/hwmon/k8temp
  F:    drivers/hwmon/k8temp.c
  
 +KTAP
 +M:    Jovi Zhangwei <jovi.zhangwei@gmail.com>
 +W:    http://www.ktap.org
 +L:    ktap@freelists.org
 +S:    Maintained
 +F:    drivers/staging/ktap/
 +
  KCONFIG
  M:    Michal Marek <mmarek@suse.cz>
  L:    linux-kbuild@vger.kernel.org
@@@ -6125,12 -6109,6 +6125,12 @@@ L:    linux-omap@vger.kernel.or
  S:    Maintained
  F:    drivers/gpio/gpio-omap.c
  
 +OMAP/NEWFLOW NANOBONE MACHINE SUPPORT
 +M:    Mark Jackson <mpfj@newflow.co.uk>
 +L:    linux-omap@vger.kernel.org
 +S:    Maintained
 +F:    arch/arm/boot/dts/am335x-nano.dts
 +
  OMFS FILESYSTEM
  M:    Bob Copeland <me@bobcopeland.com>
  L:    linux-karma-devel@lists.sourceforge.net
@@@ -6972,7 -6950,7 +6972,7 @@@ M:      "Paul E. McKenney" <paulmck@linux.vn
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
  F:    Documentation/RCU/torture.txt
 -F:    kernel/rcutorture.c
 +F:    kernel/rcu/torture.c
  
  RDC R-321X SoC
  M:    Florian Fainelli <florian@openwrt.org>
@@@ -6999,9 -6977,8 +6999,9 @@@ T:      git git://git.kernel.org/pub/scm/lin
  F:    Documentation/RCU/
  X:    Documentation/RCU/torture.txt
  F:    include/linux/rcu*
 -F:    kernel/rcu*
 -X:    kernel/rcutorture.c
 +X:    include/linux/srcu.h
 +F:    kernel/rcu/
 +X:    kernel/rcu/torture.c
  
  REAL TIME CLOCK (RTC) SUBSYSTEM
  M:    Alessandro Zummo <a.zummo@towertech.it>
@@@ -7326,6 -7303,8 +7326,8 @@@ S:      Maintaine
  F:    kernel/sched/
  F:    include/linux/sched.h
  F:    include/uapi/linux/sched.h
+ F:    kernel/wait.c
+ F:    include/linux/wait.h
  
  SCORE ARCHITECTURE
  M:    Chen Liqin <liqin.linux@gmail.com>
@@@ -7688,8 -7667,8 +7690,8 @@@ M:      "Paul E. McKenney" <paulmck@linux.vn
  W:    http://www.rdrop.com/users/paulmck/RCU/
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
 -F:    include/linux/srcu*
 -F:    kernel/srcu*
 +F:    include/linux/srcu.h
 +F:    kernel/rcu/srcu.c
  
  SMACK SECURITY MODULE
  M:    Casey Schaufler <casey@schaufler-ca.com>
@@@ -8024,7 -8003,7 +8026,7 @@@ S:      Maintaine
  F:    drivers/staging/media/go7007/
  
  STAGING - INDUSTRIAL IO
 -M:    Jonathan Cameron <jic23@cam.ac.uk>
 +M:    Jonathan Cameron <jic23@kernel.org>
  L:    linux-iio@vger.kernel.org
  S:    Odd Fixes
  F:    drivers/staging/iio/
@@@ -8940,14 -8919,61 +8942,14 @@@ W:   http://pegasus2.sourceforge.net
  S:    Maintained
  F:    drivers/net/usb/rtl8150.c
  
 -USB SERIAL BELKIN F5U103 DRIVER
 -M:    William Greathouse <wgreathouse@smva.com>
 -L:    linux-usb@vger.kernel.org
 -S:    Maintained
 -F:    drivers/usb/serial/belkin_sa.*
 -
 -USB SERIAL CYPRESS M8 DRIVER
 -M:    Lonnie Mendez <dignome@gmail.com>
 -L:    linux-usb@vger.kernel.org
 -S:    Maintained
 -W:    http://geocities.com/i0xox0i
 -W:    http://firstlight.net/cvs
 -F:    drivers/usb/serial/cypress_m8.*
 -
 -USB SERIAL CYBERJACK DRIVER
 -M:    Matthias Bruestle and Harald Welte <support@reiner-sct.com>
 -W:    http://www.reiner-sct.de/support/treiber_cyberjack.php
 -S:    Maintained
 -F:    drivers/usb/serial/cyberjack.c
 -
 -USB SERIAL DIGI ACCELEPORT DRIVER
 -M:    Peter Berger <pberger@brimson.com>
 -M:    Al Borchers <alborchers@steinerpoint.com>
 +USB SERIAL SUBSYSTEM
 +M:    Johan Hovold <jhovold@gmail.com>
  L:    linux-usb@vger.kernel.org
  S:    Maintained
 -F:    drivers/usb/serial/digi_acceleport.c
 -
 -USB SERIAL DRIVER
 -M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -L:    linux-usb@vger.kernel.org
 -S:    Supported
  F:    Documentation/usb/usb-serial.txt
 -F:    drivers/usb/serial/generic.c
 -F:    drivers/usb/serial/usb-serial.c
 +F:    drivers/usb/serial/
  F:    include/linux/usb/serial.h
  
 -USB SERIAL EMPEG EMPEG-CAR MARK I/II DRIVER
 -M:    Gary Brubaker <xavyer@ix.netcom.com>
 -L:    linux-usb@vger.kernel.org
 -S:    Maintained
 -F:    drivers/usb/serial/empeg.c
 -
 -USB SERIAL KEYSPAN DRIVER
 -M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -L:    linux-usb@vger.kernel.org
 -S:    Maintained
 -F:    drivers/usb/serial/*keyspan*
 -
 -USB SERIAL WHITEHEAT DRIVER
 -M:    Support Department <support@connecttech.com>
 -L:    linux-usb@vger.kernel.org
 -W:    http://www.connecttech.com
 -S:    Supported
 -F:    drivers/usb/serial/whiteheat*
 -
  USB SMSC75XX ETHERNET DRIVER
  M:    Steve Glendinning <steve.glendinning@shawell.net>
  L:    netdev@vger.kernel.org
@@@ -1103,10 -1103,8 +1103,8 @@@ retint_signal
        /* Returning to kernel space. Check if we need preemption */
        /* rcx:  threadinfo. interrupts off. */
  ENTRY(retint_kernel)
-       cmpl $0,TI_preempt_count(%rcx)
+       cmpl $0,PER_CPU_VAR(__preempt_count)
        jnz  retint_restore_args
-       bt  $TIF_NEED_RESCHED,TI_flags(%rcx)
-       jnc  retint_restore_args
        bt   $9,EFLAGS-ARGOFFSET(%rsp)  /* interrupts off? */
        jnc  retint_restore_args
        call preempt_schedule_irq
@@@ -1342,7 -1340,7 +1340,7 @@@ bad_gs
        .previous
  
  /* Call softirq on interrupt stack. Interrupts are off. */
 -ENTRY(call_softirq)
 +ENTRY(do_softirq_own_stack)
        CFI_STARTPROC
        pushq_cfi %rbp
        CFI_REL_OFFSET rbp,0
        decl PER_CPU_VAR(irq_count)
        ret
        CFI_ENDPROC
 -END(call_softirq)
 +END(do_softirq_own_stack)
  
  #ifdef CONFIG_XEN
  zeroentry xen_hypervisor_callback xen_do_hypervisor_callback
diff --combined arch/x86/kernel/irq_32.c
@@@ -100,9 -100,6 +100,6 @@@ execute_on_irq_stack(int overflow, stru
        irqctx->tinfo.task = curctx->tinfo.task;
        irqctx->tinfo.previous_esp = current_stack_pointer;
  
-       /* Copy the preempt_count so that the [soft]irq checks work. */
-       irqctx->tinfo.preempt_count = curctx->tinfo.preempt_count;
        if (unlikely(overflow))
                call_on_stack(print_stack_overflow, isp);
  
@@@ -131,7 -128,6 +128,6 @@@ void irq_ctx_init(int cpu
                                               THREAD_SIZE_ORDER));
        memset(&irqctx->tinfo, 0, sizeof(struct thread_info));
        irqctx->tinfo.cpu               = cpu;
-       irqctx->tinfo.preempt_count     = HARDIRQ_OFFSET;
        irqctx->tinfo.addr_limit        = MAKE_MM_SEG(0);
  
        per_cpu(hardirq_ctx, cpu) = irqctx;
               cpu, per_cpu(hardirq_ctx, cpu),  per_cpu(softirq_ctx, cpu));
  }
  
 -asmlinkage void do_softirq(void)
 +void do_softirq_own_stack(void)
  {
 -      unsigned long flags;
        struct thread_info *curctx;
        union irq_ctx *irqctx;
        u32 *isp;
  
 -      if (in_interrupt())
 -              return;
 -
 -      local_irq_save(flags);
 -
 -      if (local_softirq_pending()) {
 -              curctx = current_thread_info();
 -              irqctx = __this_cpu_read(softirq_ctx);
 -              irqctx->tinfo.task = curctx->task;
 -              irqctx->tinfo.previous_esp = current_stack_pointer;
 -
 -              /* build the stack frame on the softirq stack */
 -              isp = (u32 *) ((char *)irqctx + sizeof(*irqctx));
 +      curctx = current_thread_info();
 +      irqctx = __this_cpu_read(softirq_ctx);
 +      irqctx->tinfo.task = curctx->task;
 +      irqctx->tinfo.previous_esp = current_stack_pointer;
  
 -              call_on_stack(__do_softirq, isp);
 -              /*
 -               * Shouldn't happen, we returned above if in_interrupt():
 -               */
 -              WARN_ON_ONCE(softirq_count());
 -      }
 +      /* build the stack frame on the softirq stack */
 +      isp = (u32 *) ((char *)irqctx + sizeof(*irqctx));
  
 -      local_irq_restore(flags);
 +      call_on_stack(__do_softirq, isp);
  }
  
  bool handle_irq(unsigned irq, struct pt_regs *regs)
diff --combined include/linux/tty.h
@@@ -180,6 -180,7 +180,6 @@@ struct tty_port_operations 
           IFF the port was initialized. Do not use to free resources. Called
           under the port mutex to serialize against activate/shutdowns */
        void (*shutdown)(struct tty_port *port);
 -      void (*drop)(struct tty_port *port);
        /* Called under the port mutex from tty_port_open, serialized using
           the port mutex */
          /* FIXME: long term getting the tty argument *out* of this would be
@@@ -671,31 -672,17 +671,17 @@@ static inline void tty_wait_until_sent_
  #define wait_event_interruptible_tty(tty, wq, condition)              \
  ({                                                                    \
        int __ret = 0;                                                  \
-       if (!(condition)) {                                             \
-               __wait_event_interruptible_tty(tty, wq, condition, __ret);      \
-       }                                                               \
+       if (!(condition))                                               \
+               __ret = __wait_event_interruptible_tty(tty, wq,         \
+                                                      condition);      \
        __ret;                                                          \
  })
  
- #define __wait_event_interruptible_tty(tty, wq, condition, ret)               \
- do {                                                                  \
-       DEFINE_WAIT(__wait);                                            \
-                                                                       \
-       for (;;) {                                                      \
-               prepare_to_wait(&wq, &__wait, TASK_INTERRUPTIBLE);      \
-               if (condition)                                          \
-                       break;                                          \
-               if (!signal_pending(current)) {                         \
-                       tty_unlock(tty);                                        \
+ #define __wait_event_interruptible_tty(tty, wq, condition)            \
+       ___wait_event(wq, condition, TASK_INTERRUPTIBLE, 0, 0,          \
+                       tty_unlock(tty);                                \
                        schedule();                                     \
-                       tty_lock(tty);                                  \
-                       continue;                                       \
-               }                                                       \
-               ret = -ERESTARTSYS;                                     \
-               break;                                                  \
-       }                                                               \
-       finish_wait(&wq, &__wait);                                      \
- } while (0)
+                       tty_lock(tty))
  
  #ifdef CONFIG_PROC_FS
  extern void proc_tty_register_driver(struct tty_driver *);
diff --combined kernel/Makefile
@@@ -6,9 -6,9 +6,9 @@@ obj-y     = fork.o exec_domain.o panic.
            cpu.o exit.o itimer.o time.o softirq.o resource.o \
            sysctl.o sysctl_binary.o capability.o ptrace.o timer.o user.o \
            signal.o sys.o kmod.o workqueue.o pid.o task_work.o \
 -          rcupdate.o extable.o params.o posix-timers.o \
 +          extable.o params.o posix-timers.o \
-           kthread.o wait.o sys_ni.o posix-cpu-timers.o mutex.o \
+           kthread.o sys_ni.o posix-cpu-timers.o mutex.o \
 -          hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o \
 +          hrtimer.o rwsem.o nsproxy.o semaphore.o \
            notifier.o ksysfs.o cred.o reboot.o \
            async.o range.o groups.o lglock.o smpboot.o
  
@@@ -27,7 -27,6 +27,7 @@@ obj-y += power
  obj-y += printk/
  obj-y += cpu/
  obj-y += irq/
 +obj-y += rcu/
  
  obj-$(CONFIG_CHECKPOINT_RESTORE) += kcmp.o
  obj-$(CONFIG_FREEZER) += freezer.o
@@@ -82,6 -81,12 +82,6 @@@ obj-$(CONFIG_KGDB) += debug
  obj-$(CONFIG_DETECT_HUNG_TASK) += hung_task.o
  obj-$(CONFIG_LOCKUP_DETECTOR) += watchdog.o
  obj-$(CONFIG_SECCOMP) += seccomp.o
 -obj-$(CONFIG_RCU_TORTURE_TEST) += rcutorture.o
 -obj-$(CONFIG_TREE_RCU) += rcutree.o
 -obj-$(CONFIG_TREE_PREEMPT_RCU) += rcutree.o
 -obj-$(CONFIG_TREE_RCU_TRACE) += rcutree_trace.o
 -obj-$(CONFIG_TINY_RCU) += rcutiny.o
 -obj-$(CONFIG_TINY_PREEMPT_RCU) += rcutiny.o
  obj-$(CONFIG_RELAY) += relay.o
  obj-$(CONFIG_SYSCTL) += utsname_sysctl.o
  obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o
diff --combined kernel/fork.c
@@@ -817,9 -817,6 +817,6 @@@ struct mm_struct *dup_mm(struct task_st
  #ifdef CONFIG_TRANSPARENT_HUGEPAGE
        mm->pmd_huge_pte = NULL;
  #endif
- #ifdef CONFIG_NUMA_BALANCING
-       mm->first_nid = NUMA_PTE_SCAN_INIT;
- #endif
        if (!mm_init(mm, tsk))
                goto fail_nomem;
  
@@@ -1313,7 -1310,7 +1310,7 @@@ static struct task_struct *copy_process
  #endif
  
        /* Perform scheduler related setup. Assign this task to a CPU. */
-       sched_fork(p);
+       sched_fork(clone_flags, p);
  
        retval = perf_event_init_task(p);
        if (retval)
        INIT_LIST_HEAD(&p->pi_state_list);
        p->pi_state_cache = NULL;
  #endif
 -      uprobe_copy_process(p);
        /*
         * sigaltstack should be cleared when sharing the same VM
         */
        perf_event_fork(p);
  
        trace_task_newtask(p, clone_flags);
 +      uprobe_copy_process(p, clone_flags);
  
        return p;
  
diff --combined kernel/rcu/tree.c
@@@ -41,7 -41,6 +41,7 @@@
  #include <linux/export.h>
  #include <linux/completion.h>
  #include <linux/moduleparam.h>
 +#include <linux/module.h>
  #include <linux/percpu.h>
  #include <linux/notifier.h>
  #include <linux/cpu.h>
  #include <linux/ftrace_event.h>
  #include <linux/suspend.h>
  
 -#include "rcutree.h"
 +#include "tree.h"
  #include <trace/events/rcu.h>
  
  #include "rcu.h"
  
 -/*
 - * Strings used in tracepoints need to be exported via the
 - * tracing system such that tools like perf and trace-cmd can
 - * translate the string address pointers to actual text.
 - */
 -#define TPS(x)        tracepoint_string(x)
 +MODULE_ALIAS("rcutree");
 +#ifdef MODULE_PARAM_PREFIX
 +#undef MODULE_PARAM_PREFIX
 +#endif
 +#define MODULE_PARAM_PREFIX "rcutree."
  
  /* Data structures. */
  
@@@ -222,7 -222,7 +222,7 @@@ void rcu_note_context_switch(int cpu
  }
  EXPORT_SYMBOL_GPL(rcu_note_context_switch);
  
 -DEFINE_PER_CPU(struct rcu_dynticks, rcu_dynticks) = {
 +static DEFINE_PER_CPU(struct rcu_dynticks, rcu_dynticks) = {
        .dynticks_nesting = DYNTICK_TASK_EXIT_IDLE,
        .dynticks = ATOMIC_INIT(1),
  #ifdef CONFIG_NO_HZ_FULL_SYSIDLE
@@@ -371,8 -371,7 +371,8 @@@ static void rcu_eqs_enter_common(struc
  {
        trace_rcu_dyntick(TPS("Start"), oldval, rdtp->dynticks_nesting);
        if (!user && !is_idle_task(current)) {
 -              struct task_struct *idle = idle_task(smp_processor_id());
 +              struct task_struct *idle __maybe_unused =
 +                      idle_task(smp_processor_id());
  
                trace_rcu_dyntick(TPS("Error on entry: not idle task"), oldval, 0);
                ftrace_dump(DUMP_ORIG);
@@@ -408,7 -407,7 +408,7 @@@ static void rcu_eqs_enter(bool user
        long long oldval;
        struct rcu_dynticks *rdtp;
  
 -      rdtp = &__get_cpu_var(rcu_dynticks);
 +      rdtp = this_cpu_ptr(&rcu_dynticks);
        oldval = rdtp->dynticks_nesting;
        WARN_ON_ONCE((oldval & DYNTICK_TASK_NEST_MASK) == 0);
        if ((oldval & DYNTICK_TASK_NEST_MASK) == DYNTICK_TASK_NEST_VALUE)
@@@ -436,7 -435,7 +436,7 @@@ void rcu_idle_enter(void
  
        local_irq_save(flags);
        rcu_eqs_enter(false);
 -      rcu_sysidle_enter(&__get_cpu_var(rcu_dynticks), 0);
 +      rcu_sysidle_enter(this_cpu_ptr(&rcu_dynticks), 0);
        local_irq_restore(flags);
  }
  EXPORT_SYMBOL_GPL(rcu_idle_enter);
@@@ -479,7 -478,7 +479,7 @@@ void rcu_irq_exit(void
        struct rcu_dynticks *rdtp;
  
        local_irq_save(flags);
 -      rdtp = &__get_cpu_var(rcu_dynticks);
 +      rdtp = this_cpu_ptr(&rcu_dynticks);
        oldval = rdtp->dynticks_nesting;
        rdtp->dynticks_nesting--;
        WARN_ON_ONCE(rdtp->dynticks_nesting < 0);
@@@ -509,8 -508,7 +509,8 @@@ static void rcu_eqs_exit_common(struct 
        rcu_cleanup_after_idle(smp_processor_id());
        trace_rcu_dyntick(TPS("End"), oldval, rdtp->dynticks_nesting);
        if (!user && !is_idle_task(current)) {
 -              struct task_struct *idle = idle_task(smp_processor_id());
 +              struct task_struct *idle __maybe_unused =
 +                      idle_task(smp_processor_id());
  
                trace_rcu_dyntick(TPS("Error on exit: not idle task"),
                                  oldval, rdtp->dynticks_nesting);
@@@ -530,7 -528,7 +530,7 @@@ static void rcu_eqs_exit(bool user
        struct rcu_dynticks *rdtp;
        long long oldval;
  
 -      rdtp = &__get_cpu_var(rcu_dynticks);
 +      rdtp = this_cpu_ptr(&rcu_dynticks);
        oldval = rdtp->dynticks_nesting;
        WARN_ON_ONCE(oldval < 0);
        if (oldval & DYNTICK_TASK_NEST_MASK)
@@@ -557,7 -555,7 +557,7 @@@ void rcu_idle_exit(void
  
        local_irq_save(flags);
        rcu_eqs_exit(false);
 -      rcu_sysidle_exit(&__get_cpu_var(rcu_dynticks), 0);
 +      rcu_sysidle_exit(this_cpu_ptr(&rcu_dynticks), 0);
        local_irq_restore(flags);
  }
  EXPORT_SYMBOL_GPL(rcu_idle_exit);
@@@ -601,7 -599,7 +601,7 @@@ void rcu_irq_enter(void
        long long oldval;
  
        local_irq_save(flags);
 -      rdtp = &__get_cpu_var(rcu_dynticks);
 +      rdtp = this_cpu_ptr(&rcu_dynticks);
        oldval = rdtp->dynticks_nesting;
        rdtp->dynticks_nesting++;
        WARN_ON_ONCE(rdtp->dynticks_nesting == 0);
   */
  void rcu_nmi_enter(void)
  {
 -      struct rcu_dynticks *rdtp = &__get_cpu_var(rcu_dynticks);
 +      struct rcu_dynticks *rdtp = this_cpu_ptr(&rcu_dynticks);
  
        if (rdtp->dynticks_nmi_nesting == 0 &&
            (atomic_read(&rdtp->dynticks) & 0x1))
   */
  void rcu_nmi_exit(void)
  {
 -      struct rcu_dynticks *rdtp = &__get_cpu_var(rcu_dynticks);
 +      struct rcu_dynticks *rdtp = this_cpu_ptr(&rcu_dynticks);
  
        if (rdtp->dynticks_nmi_nesting == 0 ||
            --rdtp->dynticks_nmi_nesting != 0)
  }
  
  /**
 - * rcu_is_cpu_idle - see if RCU thinks that the current CPU is idle
 + * __rcu_is_watching - are RCU read-side critical sections safe?
 + *
 + * Return true if RCU is watching the running CPU, which means that
 + * this CPU can safely enter RCU read-side critical sections.  Unlike
 + * rcu_is_watching(), the caller of __rcu_is_watching() must have at
 + * least disabled preemption.
 + */
 +bool __rcu_is_watching(void)
 +{
 +      return atomic_read(this_cpu_ptr(&rcu_dynticks.dynticks)) & 0x1;
 +}
 +
 +/**
 + * rcu_is_watching - see if RCU thinks that the current CPU is idle
   *
   * If the current CPU is in its idle loop and is neither in an interrupt
   * or NMI handler, return true.
   */
 -int rcu_is_cpu_idle(void)
 +bool rcu_is_watching(void)
  {
        int ret;
  
        preempt_disable();
 -      ret = (atomic_read(&__get_cpu_var(rcu_dynticks).dynticks) & 0x1) == 0;
 +      ret = __rcu_is_watching();
        preempt_enable();
        return ret;
  }
 -EXPORT_SYMBOL(rcu_is_cpu_idle);
 +EXPORT_SYMBOL_GPL(rcu_is_watching);
  
  #if defined(CONFIG_PROVE_RCU) && defined(CONFIG_HOTPLUG_CPU)
  
@@@ -718,7 -703,7 +718,7 @@@ bool rcu_lockdep_current_cpu_online(voi
        if (in_nmi())
                return 1;
        preempt_disable();
 -      rdp = &__get_cpu_var(rcu_sched_data);
 +      rdp = this_cpu_ptr(&rcu_sched_data);
        rnp = rdp->mynode;
        ret = (rdp->grpmask & rnp->qsmaskinit) ||
              !rcu_scheduler_fully_active;
@@@ -738,7 -723,7 +738,7 @@@ EXPORT_SYMBOL_GPL(rcu_lockdep_current_c
   */
  static int rcu_is_cpu_rrupt_from_idle(void)
  {
 -      return __get_cpu_var(rcu_dynticks).dynticks_nesting <= 1;
 +      return __this_cpu_read(rcu_dynticks.dynticks_nesting) <= 1;
  }
  
  /*
@@@ -817,11 -802,8 +817,11 @@@ static int rcu_implicit_dynticks_qs(str
  
  static void record_gp_stall_check_time(struct rcu_state *rsp)
  {
 -      rsp->gp_start = jiffies;
 -      rsp->jiffies_stall = jiffies + rcu_jiffies_till_stall_check();
 +      unsigned long j = ACCESS_ONCE(jiffies);
 +
 +      rsp->gp_start = j;
 +      smp_wmb(); /* Record start time before stall time. */
 +      rsp->jiffies_stall = j + rcu_jiffies_till_stall_check();
  }
  
  /*
@@@ -916,6 -898,12 +916,12 @@@ static void print_other_cpu_stall(struc
        force_quiescent_state(rsp);  /* Kick them all. */
  }
  
+ /*
+  * This function really isn't for public consumption, but RCU is special in
+  * that context switches can allow the state machine to make progress.
+  */
+ extern void resched_cpu(int cpu);
  static void print_cpu_stall(struct rcu_state *rsp)
  {
        int cpu;
                                     3 * rcu_jiffies_till_stall_check() + 3;
        raw_spin_unlock_irqrestore(&rnp->lock, flags);
  
-       set_need_resched();  /* kick ourselves to get things going. */
+       /*
+        * Attempt to revive the RCU machinery by forcing a context switch.
+        *
+        * A context switch would normally allow the RCU state machine to make
+        * progress and it could be we're stuck in kernel space without context
+        * switches for an entirely unreasonable amount of time.
+        */
+       resched_cpu(smp_processor_id());
  }
  
  static void check_cpu_stall(struct rcu_state *rsp, struct rcu_data *rdp)
  {
 +      unsigned long completed;
 +      unsigned long gpnum;
 +      unsigned long gps;
        unsigned long j;
        unsigned long js;
        struct rcu_node *rnp;
  
 -      if (rcu_cpu_stall_suppress)
 +      if (rcu_cpu_stall_suppress || !rcu_gp_in_progress(rsp))
                return;
        j = ACCESS_ONCE(jiffies);
 +
 +      /*
 +       * Lots of memory barriers to reject false positives.
 +       *
 +       * The idea is to pick up rsp->gpnum, then rsp->jiffies_stall,
 +       * then rsp->gp_start, and finally rsp->completed.  These values
 +       * are updated in the opposite order with memory barriers (or
 +       * equivalent) during grace-period initialization and cleanup.
 +       * Now, a false positive can occur if we get an new value of
 +       * rsp->gp_start and a old value of rsp->jiffies_stall.  But given
 +       * the memory barriers, the only way that this can happen is if one
 +       * grace period ends and another starts between these two fetches.
 +       * Detect this by comparing rsp->completed with the previous fetch
 +       * from rsp->gpnum.
 +       *
 +       * Given this check, comparisons of jiffies, rsp->jiffies_stall,
 +       * and rsp->gp_start suffice to forestall false positives.
 +       */
 +      gpnum = ACCESS_ONCE(rsp->gpnum);
 +      smp_rmb(); /* Pick up ->gpnum first... */
        js = ACCESS_ONCE(rsp->jiffies_stall);
 +      smp_rmb(); /* ...then ->jiffies_stall before the rest... */
 +      gps = ACCESS_ONCE(rsp->gp_start);
 +      smp_rmb(); /* ...and finally ->gp_start before ->completed. */
 +      completed = ACCESS_ONCE(rsp->completed);
 +      if (ULONG_CMP_GE(completed, gpnum) ||
 +          ULONG_CMP_LT(j, js) ||
 +          ULONG_CMP_GE(gps, js))
 +              return; /* No stall or GP completed since entering function. */
        rnp = rdp->mynode;
        if (rcu_gp_in_progress(rsp) &&
 -          (ACCESS_ONCE(rnp->qsmask) & rdp->grpmask) && ULONG_CMP_GE(j, js)) {
 +          (ACCESS_ONCE(rnp->qsmask) & rdp->grpmask)) {
  
                /* We haven't checked in, so go dump stack. */
                print_cpu_stall(rsp);
@@@ -1346,7 -1310,7 +1359,7 @@@ static void note_gp_changes(struct rcu_
  }
  
  /*
 - * Initialize a new grace period.
 + * Initialize a new grace period.  Return 0 if no grace period required.
   */
  static int rcu_gp_init(struct rcu_state *rsp)
  {
  
        rcu_bind_gp_kthread();
        raw_spin_lock_irq(&rnp->lock);
 +      if (rsp->gp_flags == 0) {
 +              /* Spurious wakeup, tell caller to go back to sleep.  */
 +              raw_spin_unlock_irq(&rnp->lock);
 +              return 0;
 +      }
        rsp->gp_flags = 0; /* Clear all flags: New grace period. */
  
 -      if (rcu_gp_in_progress(rsp)) {
 -              /* Grace period already in progress, don't start another.  */
 +      if (WARN_ON_ONCE(rcu_gp_in_progress(rsp))) {
 +              /*
 +               * Grace period already in progress, don't start another.
 +               * Not supposed to be able to happen.
 +               */
                raw_spin_unlock_irq(&rnp->lock);
                return 0;
        }
  
        /* Advance to a new grace period and initialize state. */
 +      record_gp_stall_check_time(rsp);
 +      smp_wmb(); /* Record GP times before starting GP. */
        rsp->gpnum++;
        trace_rcu_grace_period(rsp->name, rsp->gpnum, TPS("start"));
 -      record_gp_stall_check_time(rsp);
        raw_spin_unlock_irq(&rnp->lock);
  
        /* Exclude any concurrent CPU-hotplug operations. */
  /*
   * Do one round of quiescent-state forcing.
   */
 -int rcu_gp_fqs(struct rcu_state *rsp, int fqs_state_in)
 +static int rcu_gp_fqs(struct rcu_state *rsp, int fqs_state_in)
  {
        int fqs_state = fqs_state_in;
        bool isidle = false;
@@@ -1509,12 -1464,8 +1522,12 @@@ static void rcu_gp_cleanup(struct rcu_s
        rsp->fqs_state = RCU_GP_IDLE;
        rdp = this_cpu_ptr(rsp->rda);
        rcu_advance_cbs(rsp, rnp, rdp);  /* Reduce false positives below. */
 -      if (cpu_needs_another_gp(rsp, rdp))
 -              rsp->gp_flags = 1;
 +      if (cpu_needs_another_gp(rsp, rdp)) {
 +              rsp->gp_flags = RCU_GP_FLAG_INIT;
 +              trace_rcu_grace_period(rsp->name,
 +                                     ACCESS_ONCE(rsp->gpnum),
 +                                     TPS("newreq"));
 +      }
        raw_spin_unlock_irq(&rnp->lock);
  }
  
  static int __noreturn rcu_gp_kthread(void *arg)
  {
        int fqs_state;
 +      int gf;
        unsigned long j;
        int ret;
        struct rcu_state *rsp = arg;
  
                /* Handle grace-period start. */
                for (;;) {
 +                      trace_rcu_grace_period(rsp->name,
 +                                             ACCESS_ONCE(rsp->gpnum),
 +                                             TPS("reqwait"));
                        wait_event_interruptible(rsp->gp_wq,
 -                                               rsp->gp_flags &
 +                                               ACCESS_ONCE(rsp->gp_flags) &
                                                 RCU_GP_FLAG_INIT);
 -                      if ((rsp->gp_flags & RCU_GP_FLAG_INIT) &&
 -                          rcu_gp_init(rsp))
 +                      if (rcu_gp_init(rsp))
                                break;
                        cond_resched();
                        flush_signals(current);
 +                      trace_rcu_grace_period(rsp->name,
 +                                             ACCESS_ONCE(rsp->gpnum),
 +                                             TPS("reqwaitsig"));
                }
  
                /* Handle quiescent-state forcing. */
                        j = HZ;
                        jiffies_till_first_fqs = HZ;
                }
 +              ret = 0;
                for (;;) {
 -                      rsp->jiffies_force_qs = jiffies + j;
 +                      if (!ret)
 +                              rsp->jiffies_force_qs = jiffies + j;
 +                      trace_rcu_grace_period(rsp->name,
 +                                             ACCESS_ONCE(rsp->gpnum),
 +                                             TPS("fqswait"));
                        ret = wait_event_interruptible_timeout(rsp->gp_wq,
 -                                      (rsp->gp_flags & RCU_GP_FLAG_FQS) ||
 +                                      ((gf = ACCESS_ONCE(rsp->gp_flags)) &
 +                                       RCU_GP_FLAG_FQS) ||
                                        (!ACCESS_ONCE(rnp->qsmask) &&
                                         !rcu_preempt_blocked_readers_cgp(rnp)),
                                        j);
                            !rcu_preempt_blocked_readers_cgp(rnp))
                                break;
                        /* If time for quiescent-state forcing, do it. */
 -                      if (ret == 0 || (rsp->gp_flags & RCU_GP_FLAG_FQS)) {
 +                      if (ULONG_CMP_GE(jiffies, rsp->jiffies_force_qs) ||
 +                          (gf & RCU_GP_FLAG_FQS)) {
 +                              trace_rcu_grace_period(rsp->name,
 +                                                     ACCESS_ONCE(rsp->gpnum),
 +                                                     TPS("fqsstart"));
                                fqs_state = rcu_gp_fqs(rsp, fqs_state);
 +                              trace_rcu_grace_period(rsp->name,
 +                                                     ACCESS_ONCE(rsp->gpnum),
 +                                                     TPS("fqsend"));
                                cond_resched();
                        } else {
                                /* Deal with stray signal. */
                                cond_resched();
                                flush_signals(current);
 +                              trace_rcu_grace_period(rsp->name,
 +                                                     ACCESS_ONCE(rsp->gpnum),
 +                                                     TPS("fqswaitsig"));
                        }
                        j = jiffies_till_next_fqs;
                        if (j > HZ) {
@@@ -1638,8 -1567,6 +1651,8 @@@ rcu_start_gp_advanced(struct rcu_state 
                return;
        }
        rsp->gp_flags = RCU_GP_FLAG_INIT;
 +      trace_rcu_grace_period(rsp->name, ACCESS_ONCE(rsp->gpnum),
 +                             TPS("newreq"));
  
        /*
         * We can't do wakeups while holding the rnp->lock, as that
@@@ -2341,7 -2268,7 +2354,7 @@@ static void __call_rcu_core(struct rcu_
         * If called from an extended quiescent state, invoke the RCU
         * core in order to force a re-evaluation of RCU's idleness.
         */
 -      if (rcu_is_cpu_idle() && cpu_online(smp_processor_id()))
 +      if (!rcu_is_watching() && cpu_online(smp_processor_id()))
                invoke_rcu_core();
  
        /* If interrupts were disabled or CPU offline, don't invoke RCU core. */
@@@ -2811,13 -2738,10 +2824,13 @@@ static int rcu_cpu_has_callbacks(int cp
  
        for_each_rcu_flavor(rsp) {
                rdp = per_cpu_ptr(rsp->rda, cpu);
 -              if (rdp->qlen != rdp->qlen_lazy)
 +              if (!rdp->nxtlist)
 +                      continue;
 +              hc = true;
 +              if (rdp->qlen != rdp->qlen_lazy || !all_lazy) {
                        al = false;
 -              if (rdp->nxtlist)
 -                      hc = true;
 +                      break;
 +              }
        }
        if (all_lazy)
                *all_lazy = al;
@@@ -3305,7 -3229,7 +3318,7 @@@ static void __init rcu_init_one(struct 
  
  /*
   * Compute the rcu_node tree geometry from kernel parameters.  This cannot
 - * replace the definitions in rcutree.h because those are needed to size
 + * replace the definitions in tree.h because those are needed to size
   * the ->node array in the rcu_state structure.
   */
  static void __init rcu_init_geometry(void)
@@@ -3384,8 -3308,8 +3397,8 @@@ void __init rcu_init(void
  
        rcu_bootup_announce();
        rcu_init_geometry();
 -      rcu_init_one(&rcu_sched_state, &rcu_sched_data);
        rcu_init_one(&rcu_bh_state, &rcu_bh_data);
 +      rcu_init_one(&rcu_sched_state, &rcu_sched_data);
        __rcu_init_preempt();
        open_softirq(RCU_SOFTIRQ, rcu_process_callbacks);
  
                rcu_cpu_notify(NULL, CPU_UP_PREPARE, (void *)(long)cpu);
  }
  
 -#include "rcutree_plugin.h"
 +#include "tree_plugin.h"
diff --combined kernel/softirq.c
@@@ -29,6 -29,7 +29,6 @@@
  #define CREATE_TRACE_POINTS
  #include <trace/events/irq.h>
  
 -#include <asm/irq.h>
  /*
     - No shared variables, all the data are CPU local.
     - If a softirq needs serialization, let it serialize itself
@@@ -99,13 -100,13 +99,13 @@@ static void __local_bh_disable(unsigne
  
        raw_local_irq_save(flags);
        /*
-        * The preempt tracer hooks into add_preempt_count and will break
+        * The preempt tracer hooks into preempt_count_add and will break
         * lockdep because it calls back into lockdep after SOFTIRQ_OFFSET
         * is set and before current->softirq_enabled is cleared.
         * We must manually increment preempt_count here and manually
         * call the trace_preempt_off later.
         */
-       preempt_count() += cnt;
+       __preempt_count_add(cnt);
        /*
         * Were softirqs turned off above:
         */
  #else /* !CONFIG_TRACE_IRQFLAGS */
  static inline void __local_bh_disable(unsigned long ip, unsigned int cnt)
  {
-       add_preempt_count(cnt);
+       preempt_count_add(cnt);
        barrier();
  }
  #endif /* CONFIG_TRACE_IRQFLAGS */
@@@ -133,11 -134,12 +133,11 @@@ EXPORT_SYMBOL(local_bh_disable)
  
  static void __local_bh_enable(unsigned int cnt)
  {
 -      WARN_ON_ONCE(in_irq());
        WARN_ON_ONCE(!irqs_disabled());
  
        if (softirq_count() == cnt)
                trace_softirqs_on(_RET_IP_);
-       sub_preempt_count(cnt);
+       preempt_count_sub(cnt);
  }
  
  /*
   */
  void _local_bh_enable(void)
  {
 +      WARN_ON_ONCE(in_irq());
        __local_bh_enable(SOFTIRQ_DISABLE_OFFSET);
  }
  
@@@ -168,17 -169,12 +168,17 @@@ static inline void _local_bh_enable_ip(
         * Keep preemption disabled until we are done with
         * softirq processing:
         */
-       sub_preempt_count(SOFTIRQ_DISABLE_OFFSET - 1);
+       preempt_count_sub(SOFTIRQ_DISABLE_OFFSET - 1);
  
 -      if (unlikely(!in_interrupt() && local_softirq_pending()))
 +      if (unlikely(!in_interrupt() && local_softirq_pending())) {
 +              /*
 +               * Run softirq if any pending. And do it in its own stack
 +               * as we may be calling this deep in a task call stack already.
 +               */
                do_softirq();
 +      }
  
-       dec_preempt_count();
+       preempt_count_dec();
  #ifdef CONFIG_TRACE_IRQFLAGS
        local_irq_enable();
  #endif
@@@ -260,7 -256,7 +260,7 @@@ restart
                                       " exited with %08x?\n", vec_nr,
                                       softirq_to_name[vec_nr], h->action,
                                       prev_count, preempt_count());
-                               preempt_count() = prev_count;
+                               preempt_count_set(prev_count);
                        }
  
                        rcu_bh_qs(cpu);
  
        account_irq_exit_time(current);
        __local_bh_enable(SOFTIRQ_OFFSET);
 +      WARN_ON_ONCE(in_interrupt());
        tsk_restore_flags(current, old_flags, PF_MEMALLOC);
  }
  
 -#ifndef __ARCH_HAS_DO_SOFTIRQ
 +
  
  asmlinkage void do_softirq(void)
  {
        pending = local_softirq_pending();
  
        if (pending)
 -              __do_softirq();
 +              do_softirq_own_stack();
  
        local_irq_restore(flags);
  }
  
 -#endif
 -
  /*
   * Enter an interrupt context.
   */
@@@ -332,21 -329,15 +332,21 @@@ void irq_enter(void
  static inline void invoke_softirq(void)
  {
        if (!force_irqthreads) {
 +#ifdef CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK
                /*
                 * We can safely execute softirq on the current stack if
                 * it is the irq stack, because it should be near empty
 -               * at this stage. But we have no way to know if the arch
 -               * calls irq_exit() on the irq stack. So call softirq
 -               * in its own stack to prevent from any overrun on top
 -               * of a potentially deep task stack.
 +               * at this stage.
                 */
 -              do_softirq();
 +              __do_softirq();
 +#else
 +              /*
 +               * Otherwise, irq_exit() is called on the task stack that can
 +               * be potentially deep already. So call softirq in its own stack
 +               * to prevent from any overrun.
 +               */
 +              do_softirq_own_stack();
 +#endif
        } else {
                wakeup_softirqd();
        }
@@@ -378,7 -369,7 +378,7 @@@ void irq_exit(void
  
        account_irq_exit_time(current);
        trace_hardirq_exit();
-       sub_preempt_count(HARDIRQ_OFFSET);
+       preempt_count_sub(HARDIRQ_OFFSET);
        if (!in_interrupt() && local_softirq_pending())
                invoke_softirq();
  
@@@ -780,10 -771,6 +780,10 @@@ static void run_ksoftirqd(unsigned int 
  {
        local_irq_disable();
        if (local_softirq_pending()) {
 +              /*
 +               * We can safely run softirq on inline stack, as we are not deep
 +               * in the task stack here.
 +               */
                __do_softirq();
                rcu_note_context_switch(cpu);
                local_irq_enable();
diff --combined kernel/sysctl.c
@@@ -190,7 -190,7 +190,7 @@@ static int proc_dostring_coredump(struc
  
  #ifdef CONFIG_MAGIC_SYSRQ
  /* Note: sysrq code uses it's own private copy */
 -static int __sysrq_enabled = SYSRQ_DEFAULT_ENABLE;
 +static int __sysrq_enabled = CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE;
  
  static int sysrq_sysctl_handler(ctl_table *table, int write,
                                void __user *buffer, size_t *lenp,
@@@ -371,13 -371,6 +371,6 @@@ static struct ctl_table kern_table[] = 
                .proc_handler   = proc_dointvec,
        },
        {
-               .procname       = "numa_balancing_scan_period_reset",
-               .data           = &sysctl_numa_balancing_scan_period_reset,
-               .maxlen         = sizeof(unsigned int),
-               .mode           = 0644,
-               .proc_handler   = proc_dointvec,
-       },
-       {
                .procname       = "numa_balancing_scan_period_max_ms",
                .data           = &sysctl_numa_balancing_scan_period_max,
                .maxlen         = sizeof(unsigned int),
                .mode           = 0644,
                .proc_handler   = proc_dointvec,
        },
+       {
+               .procname       = "numa_balancing_settle_count",
+               .data           = &sysctl_numa_balancing_settle_count,
+               .maxlen         = sizeof(unsigned int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec,
+       },
+       {
+               .procname       = "numa_balancing_migrate_deferred",
+               .data           = &sysctl_numa_balancing_migrate_deferred,
+               .maxlen         = sizeof(unsigned int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec,
+       },
  #endif /* CONFIG_NUMA_BALANCING */
  #endif /* CONFIG_SCHED_DEBUG */
        {
                .maxlen         = sizeof(sysctl_perf_event_sample_rate),
                .mode           = 0644,
                .proc_handler   = perf_proc_update_handler,
 +              .extra1         = &one,
        },
        {
                .procname       = "perf_cpu_time_max_percent",