1. 16 May, 2016 8 commits
    • Linus Torvalds's avatar
      Merge branch 'locking-rwsem-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3469d261
      Linus Torvalds authored
      Pull support for killable rwsems from Ingo Molnar:
       "This, by Michal Hocko, implements down_write_killable().
      
        The main usecase will be to update mm_sem usage sites to use this new
        API, to allow the mm-reaper introduced in commit aac45363 ("mm,
        oom: introduce oom reaper") to tear down oom victim address spaces
        asynchronously with minimum latencies and without deadlock worries"
      
      [ The vfs will want it too as the inode lock is changed from a mutex to
        a rwsem due to the parallel lookup and readdir updates ]
      
      * 'locking-rwsem-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        locking/rwsem: Fix comment on register clobbering
        locking/rwsem: Fix down_write_killable()
        locking/rwsem, x86: Add frame annotation for call_rwsem_down_write_failed_killable()
        locking/rwsem: Provide down_write_killable()
        locking/rwsem, x86: Provide __down_write_killable()
        locking/rwsem, s390: Provide __down_write_killable()
        locking/rwsem, ia64: Provide __down_write_killable()
        locking/rwsem, alpha: Provide __down_write_killable()
        locking/rwsem: Introduce basis for down_write_killable()
        locking/rwsem, sparc: Drop superfluous arch specific implementation
        locking/rwsem, sh: Drop superfluous arch specific implementation
        locking/rwsem, xtensa: Drop superfluous arch specific implementation
        locking/rwsem: Drop explicit memory barriers
        locking/rwsem: Get rid of __down_write_nested()
      3469d261
    • Linus Torvalds's avatar
      Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1c19b68a
      Linus Torvalds authored
      Pull locking changes from Ingo Molnar:
       "The main changes in this cycle were:
      
         - pvqspinlock statistics fixes (Davidlohr Bueso)
      
         - flip atomic_fetch_or() arguments (Peter Zijlstra)
      
         - locktorture simplification (Paul E.  McKenney)
      
         - documentation updates (SeongJae Park, David Howells, Davidlohr
           Bueso, Paul E McKenney, Peter Zijlstra, Will Deacon)
      
         - various fixes"
      
      * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        locking/atomics: Flip atomic_fetch_or() arguments
        locking/pvqspinlock: Robustify init_qspinlock_stat()
        locking/pvqspinlock: Avoid double resetting of stats
        lcoking/locktorture: Simplify the torture_runnable computation
        locking/Documentation: Clarify that ACQUIRE applies to loads, RELEASE applies to stores
        locking/Documentation: State purpose of memory-barriers.txt
        locking/Documentation: Add disclaimer
        locking/Documentation/lockdep: Fix spelling mistakes
        locking/lockdep: Deinline register_lock_class(), save 2328 bytes
        locking/locktorture: Fix NULL pointer dereference for cleanup paths
        locking/locktorture: Fix deboosting NULL pointer dereference
        locking/Documentation: Mention smp_cond_acquire()
        locking/Documentation: Insert white spaces consistently
        locking/Documentation: Fix formatting inconsistencies
        locking/Documentation: Add missed subsection in TOC
        locking/Documentation: Fix missed s/lock/acquire renames
        locking/Documentation: Clarify relationship of barrier() to control dependencies
      1c19b68a
    • Linus Torvalds's avatar
      Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 49817c33
      Linus Torvalds authored
      Pull EFI updates from Ingo Molnar:
       "The main changes in this cycle were:
      
         - Drop the unused EFI_SYSTEM_TABLES efi.flags bit and ensure the
           ARM/arm64 EFI System Table mapping is read-only (Ard Biesheuvel)
      
         - Add a comment to explain that one of the code paths in the x86/pat
           code is only executed for EFI boot (Matt Fleming)
      
         - Improve Secure Boot status checks on arm64 and handle unexpected
           errors (Linn Crosetto)
      
         - Remove the global EFI memory map variable 'memmap' as the same
           information is already available in efi::memmap (Matt Fleming)
      
         - Add EFI Memory Attribute table support for ARM/arm64 (Ard
           Biesheuvel)
      
         - Add EFI GOP framebuffer support for ARM/arm64 (Ard Biesheuvel)
      
         - Add EFI Bootloader Control driver for storing reboot(2) data in EFI
           variables for consumption by bootloaders (Jeremy Compostella)
      
         - Add Core EFI capsule support (Matt Fleming)
      
         - Add EFI capsule char driver (Kweh, Hock Leong)
      
         - Unify EFI memory map code for ARM and arm64 (Ard Biesheuvel)
      
         - Add generic EFI support for detecting when firmware corrupts CPU
           status register bits (like IRQ flags) when performing EFI runtime
           service calls (Mark Rutland)
      
        ... and other misc cleanups"
      
      * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (46 commits)
        efivarfs: Make efivarfs_file_ioctl() static
        efi: Merge boolean flag arguments
        efi/capsule: Move 'capsule' to the stack in efi_capsule_supported()
        efibc: Fix excessive stack footprint warning
        efi/capsule: Make efi_capsule_pending() lockless
        efi: Remove unnecessary (and buggy) .memmap initialization from the Xen EFI driver
        efi/runtime-wrappers: Remove ARCH_EFI_IRQ_FLAGS_MASK #ifdef
        x86/efi: Enable runtime call flag checking
        arm/efi: Enable runtime call flag checking
        arm64/efi: Enable runtime call flag checking
        efi/runtime-wrappers: Detect firmware IRQ flag corruption
        efi/runtime-wrappers: Remove redundant #ifdefs
        x86/efi: Move to generic {__,}efi_call_virt()
        arm/efi: Move to generic {__,}efi_call_virt()
        arm64/efi: Move to generic {__,}efi_call_virt()
        efi/runtime-wrappers: Add {__,}efi_call_virt() templates
        efi/arm-init: Reserve rather than unmap the memory map for ARM as well
        efi: Add misc char driver interface to update EFI firmware
        x86/efi: Force EFI reboot to process pending capsules
        efi: Add 'capsule' update support
        ...
      49817c33
    • Linus Torvalds's avatar
      Merge branch 'core-signals-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 230e51f2
      Linus Torvalds authored
      Pull core signal updates from Ingo Molnar:
       "These updates from Stas Sergeev and Andy Lutomirski, improve the
        sigaltstack interface by extending its ABI with the SS_AUTODISARM
        feature, which makes it possible to use swapcontext() in a sighandler
        that works on sigaltstack.  Without this flag, the subsequent signal
        will corrupt the state of the switched-away sighandler.
      
        The inspiration is more robust dosemu signal handling"
      
      * 'core-signals-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        signals/sigaltstack: Change SS_AUTODISARM to (1U << 31)
        signals/sigaltstack: Report current flag bits in sigaltstack()
        selftests/sigaltstack: Fix the sigaltstack test on old kernels
        signals/sigaltstack: If SS_AUTODISARM, bypass on_sig_stack()
        selftests/sigaltstack: Add new testcase for sigaltstack(SS_ONSTACK|SS_AUTODISARM)
        signals/sigaltstack: Implement SS_AUTODISARM flag
        signals/sigaltstack: Prepare to add new SS_xxx flags
        signals/sigaltstack, x86/signals: Unify the x86 sigaltstack check with other architectures
      230e51f2
    • Linus Torvalds's avatar
      Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a3871bd4
      Linus Torvalds authored
      Pull RCU updates from Ingo Molnar:
       "The main changes are:
      
         - Documentation updates, including fixes to the design-level
           requirements documentation and a fixed version of the design-level
           data-structure documentation.  These fixes include removing
           cartoons and getting rid of the html/htmlx duplication.
      
         - Further improvements to the new-age expedited grace periods.
      
         - Miscellaneous fixes.
      
         - Torture-test changes, including a new rcuperf module for measuring
           RCU grace-period performance and scalability, which is useful for
           the expedited-grace-period changes"
      
      * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (56 commits)
        rcutorture: Add boot-time adjustment of leaf fanout
        rcutorture: Add irqs-disabled test for call_rcu()
        rcutorture: Dump trace buffer upon shutdown
        rcutorture: Don't rebuild identical kernel
        rcutorture: Add OS-jitter capability
        documentation: Add documentation for RCU's major data structures
        rcutorture: Convert test duration to seconds early
        torture: Kill qemu, not parent process
        torture: Clarify refusal to run more than one torture test
        rcutorture: Consider FROZEN hotplug notifier transitions
        rcutorture: Remove redundant initialization to zero
        rcuperf: Do not wake up shutdown wait queue if "shutdown" is false.
        rcutorture: Add largish-system rcuperf scenario
        rcutorture: Avoid RCU CPU stall warning and RT throttling
        rcutorture: Add rcuperf holdoff boot parameter to reduce interference
        rcutorture: Make scripts analyze rcuperf trace data, if present
        rcutorture: Make rcuperf collect expedited event-trace data
        rcutorture: Print measure of batching efficiency
        rcutorture: Set rcuperf writer kthreads to real-time priority
        rcutorture: Bind rcuperf reader/writer kthreads to CPUs
        ...
      a3871bd4
    • Linus Torvalds's avatar
      Merge branch 'core-lib-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0052af44
      Linus Torvalds authored
      Pull core/lib update from Ingo Molnar:
       "This contains a single commit that removes an unused facility that the
        scheduler used to make use of"
      
      * 'core-lib-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        lib/proportions: Remove unused code
      0052af44
    • George Spelvin's avatar
      namei: Improve hash mixing if CONFIG_DCACHE_WORD_ACCESS · 0fed3ac8
      George Spelvin authored
      The hash mixing between adding the next 64 bits of name
      was just a bit weak.
      
      Replaced with a still very fast but slightly more effective
      mixing function.
      Signed-off-by: default avatarGeorge Spelvin <linux@horizon.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0fed3ac8
    • Borislav Petkov's avatar
      locking/rwsem: Fix comment on register clobbering · 4544ba8c
      Borislav Petkov authored
      Document explicitly that %edx can get clobbered on the slow path, on
      32-bit kernels. Something I learned the hard way. :-\
      Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Cc: linux-next@vger.kernel.org
      Link: http://lkml.kernel.org/r/20160516093428.GA26108@pd.tnicSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      4544ba8c
  2. 15 May, 2016 3 commits
  3. 14 May, 2016 11 commits
  4. 13 May, 2016 17 commits
  5. 12 May, 2016 1 commit
    • Andrea Arcangeli's avatar
      mm: thp: calculate the mapcount correctly for THP pages during WP faults · 6d0a07ed
      Andrea Arcangeli authored
      This will provide fully accuracy to the mapcount calculation in the
      write protect faults, so page pinning will not get broken by false
      positive copy-on-writes.
      
      total_mapcount() isn't the right calculation needed in
      reuse_swap_page(), so this introduces a page_trans_huge_mapcount()
      that is effectively the full accurate return value for page_mapcount()
      if dealing with Transparent Hugepages, however we only use the
      page_trans_huge_mapcount() during COW faults where it strictly needed,
      due to its higher runtime cost.
      
      This also provide at practical zero cost the total_mapcount
      information which is needed to know if we can still relocate the page
      anon_vma to the local vma. If page_trans_huge_mapcount() returns 1 we
      can reuse the page no matter if it's a pte or a pmd_trans_huge
      triggering the fault, but we can only relocate the page anon_vma to
      the local vma->anon_vma if we're sure it's only this "vma" mapping the
      whole THP physical range.
      
      Kirill A. Shutemov discovered the problem with moving the page
      anon_vma to the local vma->anon_vma in a previous version of this
      patch and another problem in the way page_move_anon_rmap() was called.
      
      Andrew Morton discovered that CONFIG_SWAP=n wouldn't build in a
      previous version, because reuse_swap_page must be a macro to call
      page_trans_huge_mapcount from swap.h, so this uses a macro again
      instead of an inline function. With this change at least it's a less
      dangerous usage than it was before, because "page" is used only once
      now, while with the previous code reuse_swap_page(page++) would have
      called page_mapcount on page+1 and it would have increased page twice
      instead of just once.
      
      Dean Luick noticed an uninitialized variable that could result in a
      rmap inefficiency for the non-THP case in a previous version.
      
      Mike Marciniszyn said:
      
      : Our RDMA tests are seeing an issue with memory locking that bisects to
      : commit 61f5d698 ("mm: re-enable THP")
      :
      : The test program registers two rather large MRs (512M) and RDMA
      : writes data to a passive peer using the first and RDMA reads it back
      : into the second MR and compares that data.  The sizes are chosen randomly
      : between 0 and 1024 bytes.
      :
      : The test will get through a few (<= 4 iterations) and then gets a
      : compare error.
      :
      : Tracing indicates the kernel logical addresses associated with the individual
      : pages at registration ARE correct , the data in the "RDMA read response only"
      : packets ARE correct.
      :
      : The "corruption" occurs when the packet crosse two pages that are not physically
      : contiguous.   The second page reads back as zero in the program.
      :
      : It looks like the user VA at the point of the compare error no longer points to
      : the same physical address as was registered.
      :
      : This patch totally resolves the issue!
      
      Link: http://lkml.kernel.org/r/1462547040-1737-2-git-send-email-aarcange@redhat.comSigned-off-by: default avatarAndrea Arcangeli <aarcange@redhat.com>
      Reviewed-by: default avatar"Kirill A. Shutemov" <kirill@shutemov.name>
      Reviewed-by: default avatarDean Luick <dean.luick@intel.com>
      Tested-by: default avatarAlex Williamson <alex.williamson@redhat.com>
      Tested-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
      Tested-by: default avatarJosh Collier <josh.d.collier@intel.com>
      Cc: Marc Haber <mh+linux-kernel@zugschlus.de>
      Cc: <stable@vger.kernel.org>	[4.5]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6d0a07ed