1. 06 Oct, 2015 7 commits
    • Paul E. McKenney's avatar
      rcu: Move preemption disabling out of __srcu_read_lock() · 49f5903b
      Paul E. McKenney authored
      Currently, __srcu_read_lock() cannot be invoked from restricted
      environments because it contains calls to preempt_disable() and
      preempt_enable(), both of which can invoke lockdep, which is a bad
      idea in some restricted execution modes.  This commit therefore moves
      the preempt_disable() and preempt_enable() from __srcu_read_lock()
      to srcu_read_lock().  It also inserts the preempt_disable() and
      preempt_enable() around the call to __srcu_read_lock() in do_exit().
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
      49f5903b
    • Paul E. McKenney's avatar
      rcu: Add online/offline info to stall warning message · 7f21aeef
      Paul E. McKenney authored
      This commit makes the RCU CPU stall warning message print online/offline
      indications immediately after a hyphen following the CPU number.  A "O"
      indicates that the global CPU-hotplug system believes that the CPU is
      online, a "o" that RCU perceived the CPU to be online at the beginning
      of the current expedited grace period, and an "N" that RCU currently
      believes that it will perceive the CPU as being online at the beginning
      of the next expedited grace period, with "." otherwise for all three
      indications.  So for CPU 10, you would normally see "10-OoN:" indicating
      that everything believes that the CPU is online.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      7f21aeef
    • Paul E. McKenney's avatar
      rcu: Eliminate panic when silly boot-time fanout specified · ee968ac6
      Paul E. McKenney authored
      This commit loosens rcutree.rcu_fanout_leaf range checks
      and replaces a panic() with a fallback to compile-time values.
      This fallback is accompanied by a WARN_ON(), and both occur when the
      rcutree.rcu_fanout_leaf value is too small to accommodate the number of
      CPUs.  For example, given the current four-level limit for the rcu_node
      tree, a system with more than 16 CPUs built with CONFIG_FANOUT=2 must
      have rcutree.rcu_fanout_leaf larger than 2.
      Reported-by: default avatarPeter Zijlstra <peterz@infradead.org>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
      ee968ac6
    • Boqun Feng's avatar
      rcu: Don't disable preemption for Tiny and Tree RCU readers · bb73c52b
      Boqun Feng authored
      Because preempt_disable() maps to barrier() for non-debug builds,
      it forces the compiler to spill and reload registers.  Because Tree
      RCU and Tiny RCU now only appear in CONFIG_PREEMPT=n builds, these
      barrier() instances generate needless extra code for each instance of
      rcu_read_lock() and rcu_read_unlock().  This extra code slows down Tree
      RCU and bloats Tiny RCU.
      
      This commit therefore removes the preempt_disable() and preempt_enable()
      from the non-preemptible implementations of __rcu_read_lock() and
      __rcu_read_unlock(), respectively.  However, for debug purposes,
      preempt_disable() and preempt_enable() are still invoked if
      CONFIG_PREEMPT_COUNT=y, because this allows detection of sleeping inside
      atomic sections in non-preemptible kernels.
      
      However, Tiny and Tree RCU operates by coalescing all RCU read-side
      critical sections on a given CPU that lie between successive quiescent
      states.  It is therefore necessary to compensate for removing barriers
      from __rcu_read_lock() and __rcu_read_unlock() by adding them to a
      couple of the RCU functions invoked during quiescent states, namely to
      rcu_all_qs() and rcu_note_context_switch().  However, note that the latter
      is more paranoia than necessity, at least until link-time optimizations
      become more aggressive.
      
      This is based on an earlier patch by Paul E. McKenney, fixing
      a bug encountered in kernels built with CONFIG_PREEMPT=n and
      CONFIG_PREEMPT_COUNT=y.
      Signed-off-by: default avatarBoqun Feng <boqun.feng@gmail.com>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      bb73c52b
    • Boqun Feng's avatar
      rcu: Use call_rcu_func_t to replace explicit type equivalents · db3e8db4
      Boqun Feng authored
      We have had the call_rcu_func_t typedef for a quite awhile, but we still
      use explicit function pointer types in some places.  These types can
      confuse cscope and can be hard to read.  This patch therefore replaces
      these types with the call_rcu_func_t typedef.
      Signed-off-by: default avatarBoqun Feng <boqun.feng@gmail.com>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
      db3e8db4
    • Boqun Feng's avatar
      rcu: Use rcu_callback_t in call_rcu*() and friends · b6a4ae76
      Boqun Feng authored
      As we now have rcu_callback_t typedefs as the type of rcu callbacks, we
      should use it in call_rcu*() and friends as the type of parameters. This
      could save us a few lines of code and make it clear which function
      requires an rcu callbacks rather than other callbacks as its argument.
      
      Besides, this can also help cscope to generate a better database for
      code reading.
      Signed-off-by: default avatarBoqun Feng <boqun.feng@gmail.com>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
      b6a4ae76
    • Davidlohr Bueso's avatar
      sched: Export sched_setscheduler_nocheck · 84778472
      Davidlohr Bueso authored
      The new locktorture rtmutex_lock tests exercise priority boosting, which
      means that they need to set some tasks to real-time priority.  To do this,
      they use sched_setscheduler_nocheck().  However, this is not exported to
      modules, which results in the following error when building locktorture
      as a module:
      
      ERROR: "sched_setscheduler_nocheck" [kernel/locking/locktorture.ko] undefined!
      
      This commit therefore adds an EXPORT_SYMBOL_GPL() to allow this function
      to be invoked from locktorture when built as a module.
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarDavidlohr Bueso <dave@stgolabs.net>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Acked-by: default avatarIngo Molnar <mingo@kernel.org>
      Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
      84778472
  2. 21 Sep, 2015 2 commits
    • Paul E. McKenney's avatar
      rcu: Suppress lockdep false positive for rcp->exp_funnel_mutex · 19a5ecde
      Paul E. McKenney authored
      In kernels built with CONFIG_PREEMPT=y, synchronize_rcu_expedited()
      invokes synchronize_sched_expedited() while holding RCU-preempt's
      root rcu_node structure's ->exp_funnel_mutex, which is acquired after
      the rcu_data structure's ->exp_funnel_mutex.  The first thing that
      synchronize_sched_expedited() will do is acquire RCU-sched's rcu_data
      structure's ->exp_funnel_mutex.   There is no danger of an actual deadlock
      because the locking order is always from RCU-preempt's expedited mutexes
      to those of RCU-sched.  Unfortunately, lockdep considers both rcu_data
      structures' ->exp_funnel_mutex to be in the same lock class and therefore
      reports a deadlock cycle.
      
      This commit silences this false positive by placing RCU-sched's rcu_data
      structures' ->exp_funnel_mutex locks into their own lock class.
      Reported-by: default avatarSasha Levin <sasha.levin@oracle.com>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      19a5ecde
    • Oleg Nesterov's avatar
      rcu: Change _wait_rcu_gp() to work around GCC bug 67055 · 66e8c57d
      Oleg Nesterov authored
      Code like this in inline functions confuses some recent versions of gcc:
      
      	const int n = const-expr;
      	whatever_t array[n];
      
      For more details, see:
      
      	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67055#c13
      
      This compiler bug results in the following failure after 114b7fd4b (rcu:
      Create rcu_sync infrastructure):
      
      	In file included from include/linux/rcupdate.h:429:0,
      			  from include/linux/rcu_sync.h:5,
      			  from kernel/rcu/sync.c:1:
      	include/linux/rcutiny.h: In function 'rcu_barrier_sched':
      	include/linux/rcutiny.h:55:20: internal compiler error: Segmentation fault
      	  static inline void rcu_barrier_sched(void)
      
      This commit therefore eliminates the constant local variable in favor of
      direct use of the expression.
      Reported-and-tested-by: default avatarMark Salter <msalter@redhat.com>
      Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      66e8c57d
  3. 20 Sep, 2015 10 commits
    • Linus Torvalds's avatar
      Linux 4.3-rc2 · 1f93e4a9
      Linus Torvalds authored
      1f93e4a9
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm · 99bc7215
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "Three fixes and a resulting cleanup for -rc2:
      
         - Andre Przywara reported that he was seeing a warning with the new
           cast inside DMA_ERROR_CODE's definition, and fixed the incorrect
           use.
      
         - Doug Anderson noticed that kgdb causes a "scheduling while atomic"
           bug.
      
         - OMAP5 folk noticed that their Thumb-2 compiled X servers crashed
           when enabling support to cover ARMv6 CPUs due to a kernel bug
           leaking some conditional context into the signal handler"
      
      * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
        ARM: 8425/1: kgdb: Don't try to stop the machine when setting breakpoints
        ARM: 8437/1: dma-mapping: fix build warning with new DMA_ERROR_CODE definition
        ARM: get rid of needless #if in signal handling code
        ARM: fix Thumb2 signal handling when ARMv6 is enabled
      99bc7215
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-4.3-rc2' of... · 30ec5682
      Linus Torvalds authored
      Merge tag 'linux-kselftest-4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest fixes from Shuah Khan:
       "This update contains 7 fixes for problems ranging from build failurs
        to incorrect error reporting"
      
      * tag 'linux-kselftest-4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests: exec: revert to default emit rule
        selftests: change install command to rsync
        selftests: mqueue: simplify the Makefile
        selftests: mqueue: allow extra cflags
        selftests: rename jump label to static_keys
        selftests/seccomp: add support for s390
        seltests/zram: fix syntax error
      30ec5682
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 009884f3
      Linus Torvalds authored
      Pull power management and ACPI updates from Rafael Wysocki:
       "Included are: a somewhat late devfreq update which however is mostly
        fixes and cleanups with one new thing only (the PPMUv2 support on
        Exynos5433), an ACPI cpufreq driver fixup and two ACPI core cleanups
        related to preprocessor directives.
      
        Specifics:
      
         - Fix a memory allocation size in the devfreq core (Xiaolong Ye).
      
         - Fix a mistake in the exynos-ppmu DT binding (Javier Martinez
           Canillas).
      
         - Add support for PPMUv2 ((Platform Performance Monitoring Unit
           version 2.0) on the Exynos5433 SoCs (Chanwoo Choi).
      
         - Fix a type casting bug in the Exynos PPMU code (MyungJoo Ham).
      
         - Assorted devfreq code cleanups and optimizations (Javi Merino,
           MyungJoo Ham, Viresh Kumar).
      
         - Fix up the ACPI cpufreq driver to use a more lightweight way to get
           to its private data in the ->get() callback (Rafael J Wysocki).
      
         - Fix a CONFIG_ prefix bug in one of the ACPI drivers and make the
           ACPI subsystem use IS_ENABLED() instead of #ifdefs in function
           bodies (Sudeep Holla)"
      
      * tag 'pm+acpi-4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq: acpi-cpufreq: Use cpufreq_cpu_get_raw() in ->get()
        ACPI: Eliminate CONFIG_.*{, _MODULE} #ifdef in favor of IS_ENABLED()
        ACPI: int340x_thermal: add missing CONFIG_ prefix
        PM / devfreq: Fix incorrect type issue.
        PM / devfreq: tegra: Update governor to use devfreq_update_stats()
        PM / devfreq: comments for get_dev_status usage updated
        PM / devfreq: drop comment about thermal setting max_freq
        PM / devfreq: cache the last call to get_dev_status()
        PM / devfreq: Drop unlikely before IS_ERR(_OR_NULL)
        PM / devfreq: exynos-ppmu: bit-wise operation bugfix.
        PM / devfreq: exynos-ppmu: Update documentation to support PPMUv2
        PM / devfreq: exynos-ppmu: Add the support of PPMUv2 for Exynos5433
        PM / devfreq: event: Remove incorrect property in exynos-ppmu DT binding
      009884f3
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · d590b2d4
      Linus Torvalds authored
      Pull clk fixes from Stephen Boyd:
       "A few driver fixes for tegra, rockchip, and st SoCs and a two-liner in
        the framework to avoid oops when get_parent ops return out of range
        values on tegra platforms"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        drivers: clk: st: Rename st_pll3200c32_407_c0_x into st_pll3200c32_cx_x
        clk: check for invalid parent index of orphans in __clk_init()
        clk: tegra: dfll: Properly protect OPP list
        clk: rockchip: add critical clock for rk3368
      d590b2d4
    • Linus Torvalds's avatar
      Merge tag 'led-fixes-for-v4.3-rc2' of... · e6827baf
      Linus Torvalds authored
      Merge tag 'led-fixes-for-v4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds
      
      Pull LED fixes from Jacek Anaszewski:
       - fix module autoload for six OF platform drivers (aat1290, bcm6328,
         bcm6358, ktd2692, max77693, ns2)
       - aat1290: add missing static modifier
       - ipaq-micro: add missing LEDS_CLASS dependency
       - lp55xx: correct Kconfig dependecy for f/w user helper
      
      * tag 'led-fixes-for-v4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
        leds:lp55xx: Correct Kconfig dependency for f/w user helper
        leds: leds-ipaq-micro: Add LEDS_CLASS dependency
        leds: aat1290: add 'static' modifier to init_mm_current_scale
        leds: leds-ns2: Fix module autoload for OF platform driver
        leds: max77693: Fix module autoload for OF platform driver
        leds: ktd2692: Fix module autoload for OF platform driver
        leds: bcm6358: Fix module autoload for OF platform driver
        leds: bcm6328: Fix module autoload for OF platform driver
        leds: aat1290: Fix module autoload for OF platform driver
      e6827baf
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma · dc847d5b
      Linus Torvalds authored
      Pull rdma fixes from Doug Ledford:
       "The new hfi1 driver in staging/rdma has had a number of fixup patches
        since being added to the tree.  This is the first batch of those fixes"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
        IB/hfi: Properly set permissions for user device files
        IB/hfi1: mask vs shift confusion
        IB/hfi1: clean up some defines
        IB/hfi1: info leak in get_ctxt_info()
        IB/hfi1: fix a locking bug
        IB/hfi1: checking for NULL instead of IS_ERR
        IB/hfi1: fix sdma_descq_cnt parameter parsing
        IB/hfi1: fix copy_to/from_user() error handling
        IB/hfi1: fix pstateinfo from returning improperly byteswapped value
      dc847d5b
    • Linus Torvalds's avatar
      Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · 2673ee56
      Linus Torvalds authored
      Pull libnvdimm fixes from Dan Williams:
      
       - a boot regression (since v4.2) fix for some ARM configurations from
         Tyler
      
       - regression (since v4.1) fixes for mkfs.xfs on a DAX enabled device
         from Jeff.  These are tagged for -stable.
      
       - a pair of locking fixes from Axel that are hidden from lockdep since
         they involve device_lock().  The "btt" one is tagged for -stable, the
         other only applies to the new "pfn" mechanism in v4.3.
      
       - a fix for the pmem ->rw_page() path to use wmb_pmem() from Ross.
      
      * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        mm: fix type cast in __pfn_to_phys()
        pmem: add proper fencing to pmem_rw_page()
        libnvdimm: pfn_devs: Fix locking in namespace_store
        libnvdimm: btt_devs: Fix locking in namespace_store
        blockdev: don't set S_DAX for misaligned partitions
        dax: fix O_DIRECT I/O to the last block of a blockdev
      2673ee56
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 133bb595
      Linus Torvalds authored
      Pull block updates from Jens Axboe:
       "This is a bit bigger than it should be, but I could (did) not want to
        send it off last week due to both wanting extra testing, and expecting
        a fix for the bounce regression as well.  In any case, this contains:
      
         - Fix for the blk-merge.c compilation warning on gcc 5.x from me.
      
         - A set of back/front SG gap merge fixes, from me and from Sagi.
           This ensures that we honor SG gapping for integrity payloads as
           well.
      
         - Two small fixes for null_blk from Matias, fixing a leak and a
           capacity propagation issue.
      
         - A blkcg fix from Tejun, fixing a NULL dereference.
      
         - A fast clone optimization from Ming, fixing a performance
           regression since the arbitrarily sized bio's were introduced.
      
         - Also from Ming, a regression fix for bouncing IOs"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        block: fix bounce_end_io
        block: blk-merge: fast-clone bio when splitting rw bios
        block: blkg_destroy_all() should clear q->root_blkg and ->root_rl.blkg
        block: Copy a user iovec if it includes gaps
        block: Refuse adding appending a gapped integrity page to a bio
        block: Refuse request/bio merges with gaps in the integrity payload
        block: Check for gaps on front and back merges
        null_blk: fix wrong capacity when bs is not 512 bytes
        null_blk: fix memory leak on cleanup
        block: fix bogus compiler warnings in blk-merge.c
      133bb595
    • Chris Mason's avatar
      fs-writeback: unplug before cond_resched in writeback_sb_inodes · 590dca3a
      Chris Mason authored
      Commit 505a666e ("writeback: plug writeback in wb_writeback() and
      writeback_inodes_wb()") has us holding a plug during writeback_sb_inodes,
      which increases the merge rate when relatively contiguous small files
      are written by the filesystem.  It helps both on flash and spindles.
      
      For an fs_mark workload creating 4K files in parallel across 8 drives,
      this commit improves performance ~9% more by unplugging before calling
      cond_resched().  cond_resched() doesn't trigger an implicit unplug, so
      explicitly getting the IO down to the device before scheduling reduces
      latencies for anyone waiting on clean pages.
      
      It also cuts down on how often we use kblockd to unplug, which means
      less work bouncing from one workqueue to another.
      
      Many more details about how we got here:
      
        https://lkml.org/lkml/2015/9/11/570Signed-off-by: default avatarChris Mason <clm@fb.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      590dca3a
  4. 19 Sep, 2015 1 commit
  5. 18 Sep, 2015 20 commits