Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 13 Oct 2014 13:44:12 +0000 (15:44 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 13 Oct 2014 13:44:12 +0000 (15:44 +0200)
Pull RCU updates from Ingo Molnar:
 "The main changes in this cycle were:

   - changes related to No-CBs CPUs and NO_HZ_FULL

   - RCU-tasks implementation

   - torture-test updates

   - miscellaneous fixes

   - locktorture updates

   - RCU documentation updates"

* 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (81 commits)
  workqueue: Use cond_resched_rcu_qs macro
  workqueue: Add quiescent state between work items
  locktorture: Cleanup header usage
  locktorture: Cannot hold read and write lock
  locktorture: Fix __acquire annotation for spinlock irq
  locktorture: Support rwlocks
  rcu: Eliminate deadlock between CPU hotplug and expedited grace periods
  locktorture: Document boot/module parameters
  rcutorture: Rename rcutorture_runnable parameter
  locktorture: Add test scenario for rwsem_lock
  locktorture: Add test scenario for mutex_lock
  locktorture: Make torture scripting account for new _runnable name
  locktorture: Introduce torture context
  locktorture: Support rwsems
  locktorture: Add infrastructure for torturing read locks
  torture: Address race in module cleanup
  locktorture: Make statistics generic
  locktorture: Teach about lock debugging
  locktorture: Support mutexes
  locktorture: Add documentation
  ...

1  2 
Documentation/kernel-parameters.txt
fs/file.c
include/linux/lockdep.h
include/linux/sched.h
init/Kconfig
init/main.c
kernel/sysctl.c
mm/mlock.c

index f8a07128a6e843331ec70098bd32560a1ba3e70f,aa0eedc84d003361a8f69ade977e37f95baf8ffe..04e9f5505faa8fa4133c198a946cdefab241824d
@@@ -656,8 -656,7 +656,8 @@@ bytes respectively. Such letter suffixe
                        Sets the size of kernel global memory area for
                        contiguous memory allocations and optionally the
                        placement constraint by the physical address range of
 -                      memory allocations. For more information, see
 +                      memory allocations. A value of 0 disables CMA
 +                      altogether. For more information, see
                        include/linux/dma-contiguous.h
  
        cmo_free_hint=  [PPC] Format: { yes | no }
  
        earlycon=       [KNL] Output early console device and options.
  
 +              cdns,<addr>
 +                      Start an early, polled-mode console on a cadence serial
 +                      port at the specified address. The cadence serial port
 +                      must already be setup and configured. Options are not
 +                      yet supported.
 +
                uart[8250],io,<addr>[,options]
                uart[8250],mmio,<addr>[,options]
                uart[8250],mmio32,<addr>[,options]
                        must already be setup and configured. Options are not
                        yet supported.
  
 +              msm_serial,<addr>
 +                      Start an early, polled-mode console on an msm serial
 +                      port at the specified address. The serial port
 +                      must already be setup and configured. Options are not
 +                      yet supported.
 +
 +              msm_serial_dm,<addr>
 +                      Start an early, polled-mode console on an msm serial
 +                      dm port at the specified address. The serial port
 +                      must already be setup and configured. Options are not
 +                      yet supported.
 +
                smh     Use ARM semihosting calls for early console.
  
        earlyprintk=    [X86,SH,BLACKFIN,ARM,M68k]
                        Set number of hash buckets for inode cache.
  
        ima_appraise=   [IMA] appraise integrity measurements
 -                      Format: { "off" | "enforce" | "fix" }
 +                      Format: { "off" | "enforce" | "fix" | "log" }
                        default: "enforce"
  
        ima_appraise_tcb [IMA]
        lockd.nlm_udpport=M     [NFS] Assign UDP port.
                        Format: <integer>
  
+       locktorture.nreaders_stress= [KNL]
+                       Set the number of locking read-acquisition kthreads.
+                       Defaults to being automatically set based on the
+                       number of online CPUs.
+       locktorture.nwriters_stress= [KNL]
+                       Set the number of locking write-acquisition kthreads.
+       locktorture.onoff_holdoff= [KNL]
+                       Set time (s) after boot for CPU-hotplug testing.
+       locktorture.onoff_interval= [KNL]
+                       Set time (s) between CPU-hotplug operations, or
+                       zero to disable CPU-hotplug testing.
+       locktorture.shuffle_interval= [KNL]
+                       Set task-shuffle interval (jiffies).  Shuffling
+                       tasks allows some CPUs to go into dyntick-idle
+                       mode during the locktorture test.
+       locktorture.shutdown_secs= [KNL]
+                       Set time (s) after boot system shutdown.  This
+                       is useful for hands-off automated testing.
+       locktorture.stat_interval= [KNL]
+                       Time (s) between statistics printk()s.
+       locktorture.stutter= [KNL]
+                       Time (s) to stutter testing, for example,
+                       specifying five seconds causes the test to run for
+                       five seconds, wait for five seconds, and so on.
+                       This tests the locking primitive's ability to
+                       transition abruptly to and from idle.
+       locktorture.torture_runnable= [BOOT]
+                       Start locktorture running at boot time.
+       locktorture.torture_type= [KNL]
+                       Specify the locking implementation to test.
+       locktorture.verbose= [KNL]
+                       Enable additional printk() statements.
        logibm.irq=     [HW,MOUSE] Logitech Bus Mouse Driver
                        Format: <irq>
  
                        Lazy RCU callbacks are those which RCU can
                        prove do nothing more than free memory.
  
+       rcutorture.cbflood_inter_holdoff= [KNL]
+                       Set holdoff time (jiffies) between successive
+                       callback-flood tests.
+       rcutorture.cbflood_intra_holdoff= [KNL]
+                       Set holdoff time (jiffies) between successive
+                       bursts of callbacks within a given callback-flood
+                       test.
+       rcutorture.cbflood_n_burst= [KNL]
+                       Set the number of bursts making up a given
+                       callback-flood test.  Set this to zero to
+                       disable callback-flood testing.
+       rcutorture.cbflood_n_per_burst= [KNL]
+                       Set the number of callbacks to be registered
+                       in a given burst of a callback-flood test.
        rcutorture.fqs_duration= [KNL]
                        Set duration of force_quiescent_state bursts.
  
                        Set time (s) between CPU-hotplug operations, or
                        zero to disable CPU-hotplug testing.
  
-       rcutorture.rcutorture_runnable= [BOOT]
+       rcutorture.torture_runnable= [BOOT]
                        Start rcutorture running at boot time.
  
        rcutorture.shuffle_interval= [KNL]
        rcupdate.rcu_cpu_stall_timeout= [KNL]
                        Set timeout for RCU CPU stall warning messages.
  
+       rcupdate.rcu_task_stall_timeout= [KNL]
+                       Set timeout in jiffies for RCU task stall warning
+                       messages.  Disable with a value less than or equal
+                       to zero.
        rdinit=         [KNL]
                        Format: <full_path>
                        Run specified binary instead of /init from the ramdisk,
  
        slram=          [HW,MTD]
  
 +      slab_nomerge    [MM]
 +                      Disable merging of slabs with similar size. May be
 +                      necessary if there is some reason to distinguish
 +                      allocs to different slabs. Debug options disable
 +                      merging on their own.
 +                      For more information see Documentation/vm/slub.txt.
 +
        slab_max_order= [MM, SLAB]
                        Determines the maximum allowed order for slabs.
                        A high setting may cause OOMs due to memory
                        For more information see Documentation/vm/slub.txt.
  
        slub_nomerge    [MM, SLUB]
 -                      Disable merging of slabs with similar size. May be
 -                      necessary if there is some reason to distinguish
 -                      allocs to different slabs. Debug options disable
 -                      merging on their own.
 -                      For more information see Documentation/vm/slub.txt.
 +                      Same with slab_nomerge. This is supported for legacy.
 +                      See slab_nomerge for more information.
  
        smart2=         [HW]
                        Format: <io1>[,<io2>[,...,<io8>]]
  
        tdfx=           [HW,DRM]
  
 -      test_suspend=   [SUSPEND]
 +      test_suspend=   [SUSPEND][,N]
                        Specify "mem" (for Suspend-to-RAM) or "standby" (for
 -                      standby suspend) as the system sleep state to briefly
 -                      enter during system startup.  The system is woken from
 -                      this state using a wakeup-capable RTC alarm.
 +                      standby suspend) or "freeze" (for suspend type freeze)
 +                      as the system sleep state during system startup with
 +                      the optional capability to repeat N number of times.
 +                      The system is woken from this state using a
 +                      wakeup-capable RTC alarm.
  
        thash_entries=  [KNL,NET]
                        Set number of hash buckets for TCP connection
                                        READ_DISC_INFO command);
                                e = NO_READ_CAPACITY_16 (don't use
                                        READ_CAPACITY_16 command);
 +                              f = NO_REPORT_OPCODES (don't use report opcodes
 +                                      command, uas only);
                                h = CAPACITY_HEURISTICS (decrease the
                                        reported device capacity by one
                                        sector if the number is odd);
                                        bogus residue values);
                                s = SINGLE_LUN (the device has only one
                                        Logical Unit);
 +                              t = NO_ATA_1X (don't allow ATA(12) and ATA(16)
 +                                      commands, uas only);
                                u = IGNORE_UAS (don't bind to the uas driver);
                                w = NO_WP_DETECT (don't test whether the
                                        medium is write-protected).
diff --combined fs/file.c
index f3b2c206c18dd9640935d2fc8ece1e07e589fa0f,1cafc4c9275b6b7b58f7b6f82a8d4e35bda1794d..ab3eb6a8823940643ab376782cd9a1e47c583c98
+++ b/fs/file.c
@@@ -367,7 -367,7 +367,7 @@@ static struct fdtable *close_files(stru
                                struct file * file = xchg(&fdt->fd[i], NULL);
                                if (file) {
                                        filp_close(file, files);
-                                       cond_resched();
+                                       cond_resched_rcu_qs();
                                }
                        }
                        i++;
@@@ -750,7 -750,6 +750,7 @@@ bool get_close_on_exec(unsigned int fd
  
  static int do_dup2(struct files_struct *files,
        struct file *file, unsigned fd, unsigned flags)
 +__releases(&files->file_lock)
  {
        struct file *tofree;
        struct fdtable *fdt;
diff --combined include/linux/lockdep.h
index 64c7425afbcec6036f25385b15c1e566be3d92bb,4f86465cc31744a77d14128a1ab924bef2f3164b..72d6dea7fac1acd6a0e7863e4579f111f781cbc5
@@@ -362,10 -362,6 +362,10 @@@ extern void lockdep_trace_alloc(gfp_t m
                WARN_ON(debug_locks && !lockdep_is_held(l));    \
        } while (0)
  
 +#define lockdep_assert_held_once(l)   do {                            \
 +              WARN_ON_ONCE(debug_locks && !lockdep_is_held(l));       \
 +      } while (0)
 +
  #define lockdep_recursing(tsk)        ((tsk)->lockdep_recursion)
  
  #else /* !CONFIG_LOCKDEP */
@@@ -416,7 -412,6 +416,7 @@@ struct lock_class_key { }
  #define lockdep_depth(tsk)    (0)
  
  #define lockdep_assert_held(l)                        do { (void)(l); } while (0)
 +#define lockdep_assert_held_once(l)           do { (void)(l); } while (0)
  
  #define lockdep_recursing(tsk)                        (0)
  
@@@ -510,6 -505,7 +510,7 @@@ static inline void print_irqtrace_event
  
  #define lock_map_acquire(l)                   lock_acquire_exclusive(l, 0, 0, NULL, _THIS_IP_)
  #define lock_map_acquire_read(l)              lock_acquire_shared_recursive(l, 0, 0, NULL, _THIS_IP_)
+ #define lock_map_acquire_tryread(l)           lock_acquire_shared_recursive(l, 0, 1, NULL, _THIS_IP_)
  #define lock_map_release(l)                   lock_release(l, 1, _THIS_IP_)
  
  #ifdef CONFIG_PROVE_LOCKING
diff --combined include/linux/sched.h
index 5e63ba59258c5909588f073c546743ef1f35c6b7,42888d715fb1dfd8d27d6c0780253105c1aeb263..05a8c00e8339dd31599f4fd2454296469b9dd763
@@@ -167,7 -167,6 +167,7 @@@ extern int nr_threads
  DECLARE_PER_CPU(unsigned long, process_counts);
  extern int nr_processes(void);
  extern unsigned long nr_running(void);
 +extern bool single_task_running(void);
  extern unsigned long nr_iowait(void);
  extern unsigned long nr_iowait_cpu(int cpu);
  extern void get_iowait_load(unsigned long *nr_waiters, unsigned long *load);
@@@ -1213,6 -1212,13 +1213,13 @@@ struct sched_dl_entity 
        struct hrtimer dl_timer;
  };
  
+ union rcu_special {
+       struct {
+               bool blocked;
+               bool need_qs;
+       } b;
+       short s;
+ };
  struct rcu_node;
  
  enum perf_event_task_context {
@@@ -1265,12 -1271,18 +1272,18 @@@ struct task_struct 
  
  #ifdef CONFIG_PREEMPT_RCU
        int rcu_read_lock_nesting;
-       char rcu_read_unlock_special;
+       union rcu_special rcu_read_unlock_special;
        struct list_head rcu_node_entry;
  #endif /* #ifdef CONFIG_PREEMPT_RCU */
  #ifdef CONFIG_TREE_PREEMPT_RCU
        struct rcu_node *rcu_blocked_node;
  #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
+ #ifdef CONFIG_TASKS_RCU
+       unsigned long rcu_tasks_nvcsw;
+       bool rcu_tasks_holdout;
+       struct list_head rcu_tasks_holdout_list;
+       int rcu_tasks_idle_cpu;
+ #endif /* #ifdef CONFIG_TASKS_RCU */
  
  #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT)
        struct sched_info sched_info;
@@@ -1904,6 -1916,8 +1917,6 @@@ extern void thread_group_cputime_adjust
  #define PF_KTHREAD    0x00200000      /* I am a kernel thread */
  #define PF_RANDOMIZE  0x00400000      /* randomize virtual address space */
  #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_NO_SETAFFINITY 0x04000000  /* Userland is not allowed to meddle with cpus_allowed */
  #define PF_MCE_EARLY    0x08000000      /* Early kill for mce process policy */
  #define PF_MUTEX_TESTER       0x20000000      /* Thread belongs to the rt mutex tester */
  #define tsk_used_math(p) ((p)->flags & PF_USED_MATH)
  #define used_math() tsk_used_math(current)
  
 -/* __GFP_IO isn't allowed if PF_MEMALLOC_NOIO is set in current->flags */
 +/* __GFP_IO isn't allowed if PF_MEMALLOC_NOIO is set in current->flags
 + * __GFP_FS is also cleared as it implies __GFP_IO.
 + */
  static inline gfp_t memalloc_noio_flags(gfp_t flags)
  {
        if (unlikely(current->flags & PF_MEMALLOC_NOIO))
 -              flags &= ~__GFP_IO;
 +              flags &= ~(__GFP_IO | __GFP_FS);
        return flags;
  }
  
@@@ -1958,31 -1970,17 +1971,31 @@@ static inline void memalloc_noio_restor
  }
  
  /* Per-process atomic flags. */
 -#define PFA_NO_NEW_PRIVS 0x00000001   /* May not gain new privileges. */
 +#define PFA_NO_NEW_PRIVS 0    /* May not gain new privileges. */
 +#define PFA_SPREAD_PAGE  1      /* Spread page cache over cpuset */
 +#define PFA_SPREAD_SLAB  2      /* Spread some slab caches over cpuset */
  
 -static inline bool task_no_new_privs(struct task_struct *p)
 -{
 -      return test_bit(PFA_NO_NEW_PRIVS, &p->atomic_flags);
 -}
  
 -static inline void task_set_no_new_privs(struct task_struct *p)
 -{
 -      set_bit(PFA_NO_NEW_PRIVS, &p->atomic_flags);
 -}
 +#define TASK_PFA_TEST(name, func)                                     \
 +      static inline bool task_##func(struct task_struct *p)           \
 +      { return test_bit(PFA_##name, &p->atomic_flags); }
 +#define TASK_PFA_SET(name, func)                                      \
 +      static inline void task_set_##func(struct task_struct *p)       \
 +      { set_bit(PFA_##name, &p->atomic_flags); }
 +#define TASK_PFA_CLEAR(name, func)                                    \
 +      static inline void task_clear_##func(struct task_struct *p)     \
 +      { clear_bit(PFA_##name, &p->atomic_flags); }
 +
 +TASK_PFA_TEST(NO_NEW_PRIVS, no_new_privs)
 +TASK_PFA_SET(NO_NEW_PRIVS, no_new_privs)
 +
 +TASK_PFA_TEST(SPREAD_PAGE, spread_page)
 +TASK_PFA_SET(SPREAD_PAGE, spread_page)
 +TASK_PFA_CLEAR(SPREAD_PAGE, spread_page)
 +
 +TASK_PFA_TEST(SPREAD_SLAB, spread_slab)
 +TASK_PFA_SET(SPREAD_SLAB, spread_slab)
 +TASK_PFA_CLEAR(SPREAD_SLAB, spread_slab)
  
  /*
   * task->jobctl flags
@@@ -2014,29 -2012,21 +2027,21 @@@ extern void task_clear_jobctl_trapping(
  extern void task_clear_jobctl_pending(struct task_struct *task,
                                      unsigned int mask);
  
- #ifdef CONFIG_PREEMPT_RCU
- #define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */
- #define RCU_READ_UNLOCK_NEED_QS (1 << 1) /* RCU core needs CPU response. */
  static inline void rcu_copy_process(struct task_struct *p)
  {
+ #ifdef CONFIG_PREEMPT_RCU
        p->rcu_read_lock_nesting = 0;
-       p->rcu_read_unlock_special = 0;
- #ifdef CONFIG_TREE_PREEMPT_RCU
+       p->rcu_read_unlock_special.s = 0;
        p->rcu_blocked_node = NULL;
- #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
        INIT_LIST_HEAD(&p->rcu_node_entry);
+ #endif /* #ifdef CONFIG_PREEMPT_RCU */
+ #ifdef CONFIG_TASKS_RCU
+       p->rcu_tasks_holdout = false;
+       INIT_LIST_HEAD(&p->rcu_tasks_holdout_list);
+       p->rcu_tasks_idle_cpu = -1;
+ #endif /* #ifdef CONFIG_TASKS_RCU */
  }
  
- #else
- static inline void rcu_copy_process(struct task_struct *p)
- {
- }
- #endif
  static inline void tsk_restore_flags(struct task_struct *task,
                                unsigned long orig_flags, unsigned long flags)
  {
@@@ -2623,22 -2613,9 +2628,22 @@@ static inline void setup_thread_stack(s
        task_thread_info(p)->task = p;
  }
  
 +/*
 + * Return the address of the last usable long on the stack.
 + *
 + * When the stack grows down, this is just above the thread
 + * info struct. Going any lower will corrupt the threadinfo.
 + *
 + * When the stack grows up, this is the highest address.
 + * Beyond that position, we corrupt data on the next page.
 + */
  static inline unsigned long *end_of_stack(struct task_struct *p)
  {
 +#ifdef CONFIG_STACK_GROWSUP
 +      return (unsigned long *)((unsigned long)task_thread_info(p) + THREAD_SIZE) - 1;
 +#else
        return (unsigned long *)(task_thread_info(p) + 1);
 +#endif
  }
  
  #endif
diff --combined init/Kconfig
index d2355812ba48a7e1f52855ad9c431878ee32f175,4fe5500b998f5810365731cc7c0d146ade19f4b1..1c505e09042283199905b9d5c25557dbdc2ea17d
@@@ -507,6 -507,16 +507,16 @@@ config PREEMPT_RC
          This option enables preemptible-RCU code that is common between
          TREE_PREEMPT_RCU and, in the old days, TINY_PREEMPT_RCU.
  
+ config TASKS_RCU
+       bool "Task_based RCU implementation using voluntary context switch"
+       default n
+       help
+         This option enables a task-based RCU implementation that uses
+         only voluntary context switch (not preemption!), idle, and
+         user-mode execution as quiescent states.
+         If unsure, say N.
  config RCU_STALL_COMMON
        def_bool ( TREE_RCU || TREE_PREEMPT_RCU || RCU_TRACE )
        help
@@@ -737,7 -747,7 +747,7 @@@ choic
  
  config RCU_NOCB_CPU_NONE
        bool "No build_forced no-CBs CPUs"
-       depends on RCU_NOCB_CPU && !NO_HZ_FULL_ALL
+       depends on RCU_NOCB_CPU
        help
          This option does not force any of the CPUs to be no-CBs CPUs.
          Only CPUs designated by the rcu_nocbs= boot parameter will be
  
  config RCU_NOCB_CPU_ZERO
        bool "CPU 0 is a build_forced no-CBs CPU"
-       depends on RCU_NOCB_CPU && !NO_HZ_FULL_ALL
+       depends on RCU_NOCB_CPU
        help
          This option forces CPU 0 to be a no-CBs CPU, so that its RCU
          callbacks are invoked by a per-CPU kthread whose name begins
@@@ -811,7 -821,6 +821,7 @@@ config LOG_BUF_SHIF
        int "Kernel log buffer size (16 => 64KB, 17 => 128KB)"
        range 12 21
        default 17
 +      depends on PRINTK
        help
          Select the minimal kernel log buffer size as a power of 2.
          The final size is affected by LOG_CPU_MAX_BUF_SHIFT config
@@@ -831,7 -840,6 +841,7 @@@ config LOG_CPU_MAX_BUF_SHIF
        range 0 21
        default 12 if !BASE_SMALL
        default 0 if BASE_SMALL
 +      depends on PRINTK
        help
          This option allows to increase the default ring buffer size
          according to the number of CPUs. The value defines the contribution
@@@ -889,6 -897,17 +899,6 @@@ config ARCH_SUPPORTS_INT12
  config ARCH_WANT_NUMA_VARIABLE_LOCALITY
        bool
  
 -#
 -# For architectures that are willing to define _PAGE_NUMA as _PAGE_PROTNONE
 -config ARCH_WANTS_PROT_NUMA_PROT_NONE
 -      bool
 -
 -config ARCH_USES_NUMA_PROT_NONE
 -      bool
 -      default y
 -      depends on ARCH_WANTS_PROT_NUMA_PROT_NONE
 -      depends on NUMA_BALANCING
 -
  config NUMA_BALANCING_DEFAULT_ENABLED
        bool "Automatically enable NUMA aware memory/task placement"
        default y
@@@ -1466,7 -1485,6 +1476,7 @@@ config FUTE
  
  config HAVE_FUTEX_CMPXCHG
        bool
 +      depends on FUTEX
        help
          Architectures should select this if futex_atomic_cmpxchg_inatomic()
          is implemented and always working. This removes a couple of runtime
@@@ -1529,16 -1547,6 +1539,16 @@@ config AI
          by some high performance threaded applications. Disabling
          this option saves about 7k.
  
 +config ADVISE_SYSCALLS
 +      bool "Enable madvise/fadvise syscalls" if EXPERT
 +      default y
 +      help
 +        This option enables the madvise and fadvise syscalls, used by
 +        applications to advise the kernel about their future memory or file
 +        usage, improving performance. If building an embedded system where no
 +        applications use these syscalls, you can disable this option to save
 +        space.
 +
  config PCI_QUIRKS
        default y
        bool "Enable PCI quirk workarounds" if EXPERT
@@@ -1908,49 -1916,6 +1918,49 @@@ config MODULE_SIG_HAS
        default "sha384" if MODULE_SIG_SHA384
        default "sha512" if MODULE_SIG_SHA512
  
 +config MODULE_COMPRESS
 +      bool "Compress modules on installation"
 +      depends on MODULES
 +      help
 +        This option compresses the kernel modules when 'make
 +        modules_install' is run.
 +
 +        The modules will be compressed either using gzip or xz depend on the
 +        choice made in "Compression algorithm".
 +
 +        module-init-tools has support for gzip format while kmod handle gzip
 +        and xz compressed modules.
 +
 +        When a kernel module is installed from outside of the main kernel
 +        source and uses the Kbuild system for installing modules then that
 +        kernel module will also be compressed when it is installed.
 +
 +        This option provides little benefit when the modules are to be used inside
 +        an initrd or initramfs, it generally is more efficient to compress the whole
 +        initrd or initramfs instead.
 +
 +        This is fully compatible with signed modules while the signed module is
 +        compressed. module-init-tools or kmod handles decompression and provide to
 +        other layer the uncompressed but signed payload.
 +
 +choice
 +      prompt "Compression algorithm"
 +      depends on MODULE_COMPRESS
 +      default MODULE_COMPRESS_GZIP
 +      help
 +        This determines which sort of compression will be used during
 +        'make modules_install'.
 +
 +        GZIP (default) and XZ are supported.
 +
 +config MODULE_COMPRESS_GZIP
 +      bool "GZIP"
 +
 +config MODULE_COMPRESS_XZ
 +      bool "XZ"
 +
 +endchoice
 +
  endif # MODULES
  
  config INIT_ALL_POSSIBLE
diff --combined init/main.c
index 8af2f1abfe38d5f36eade88169f4f9cd04d8ec5a,e3c4cdd94d5b62ea561da64644e5e95708116ce1..c5c11da6c4e15ef6ede067a7bfdcf34e8fce34ad
@@@ -577,12 -577,14 +577,13 @@@ asmlinkage __visible void __init start_
                local_irq_disable();
        idr_init_cache();
        rcu_init();
 -      tick_nohz_init();
 -      rcu_init_nohz();
        context_tracking_init();
        radix_tree_init();
        /* init some links before init_ISA_irqs() */
        early_irq_init();
        init_IRQ();
        tick_init();
++      rcu_init_nohz();
        init_timers();
        hrtimers_init();
        softirq_init();
diff --combined kernel/sysctl.c
index 91180987e40e6c6acf88ad2a6e9aab4ea558b1f1,ab456664609d4ed766a555424cfc705b2919ff39..4aada6d9fe7445f53e88702fa5e983dc06abd367
@@@ -1055,15 -1055,6 +1055,6 @@@ static struct ctl_table kern_table[] = 
                .child          = key_sysctls,
        },
  #endif
- #ifdef CONFIG_RCU_TORTURE_TEST
-       {
-               .procname       = "rcutorture_runnable",
-               .data           = &rcutorture_runnable,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = proc_dointvec,
-       },
- #endif
  #ifdef CONFIG_PERF_EVENTS
        /*
         * User-space scripts rely on the existence of this file
@@@ -1460,6 -1451,13 +1451,6 @@@ static struct ctl_table vm_table[] = 
                .extra2         = &one,
        },
  #endif
 -      {
 -              .procname       = "scan_unevictable_pages",
 -              .data           = &scan_unevictable_pages,
 -              .maxlen         = sizeof(scan_unevictable_pages),
 -              .mode           = 0644,
 -              .proc_handler   = scan_unevictable_handler,
 -      },
  #ifdef CONFIG_MEMORY_FAILURE
        {
                .procname       = "memory_failure_early_kill",
diff --combined mm/mlock.c
index 03aa8512723b3120277702d60e032031de0e425f,ab3150c2671124e1c62cb0258e1f18bb7049760a..73cf0987088c36647fbb805278978bb656ff1fda
@@@ -233,9 -233,9 +233,9 @@@ long __mlock_vma_pages_range(struct vm_
  
        VM_BUG_ON(start & ~PAGE_MASK);
        VM_BUG_ON(end   & ~PAGE_MASK);
 -      VM_BUG_ON(start < vma->vm_start);
 -      VM_BUG_ON(end   > vma->vm_end);
 -      VM_BUG_ON(!rwsem_is_locked(&mm->mmap_sem));
 +      VM_BUG_ON_VMA(start < vma->vm_start, vma);
 +      VM_BUG_ON_VMA(end   > vma->vm_end, vma);
 +      VM_BUG_ON_MM(!rwsem_is_locked(&mm->mmap_sem), mm);
  
        gup_flags = FOLL_TOUCH | FOLL_MLOCK;
        /*
@@@ -789,7 -789,7 +789,7 @@@ static int do_mlockall(int flags
  
                /* Ignore errors */
                mlock_fixup(vma, &prev, vma->vm_start, vma->vm_end, newflags);
-               cond_resched();
+               cond_resched_rcu_qs();
        }
  out:
        return 0;