01 Sep, 2020

1 commit


08 Aug, 2020

1 commit

  • Pull powerpc updates from Michael Ellerman:

    - Add support for (optionally) using queued spinlocks & rwlocks.

    - Support for a new faster system call ABI using the scv instruction on
    Power9 or later.

    - Drop support for the PROT_SAO mmap/mprotect flag as it will be
    unsupported on Power10 and future processors, leaving us with no way
    to implement the functionality it requests. This risks breaking
    userspace, though we believe it is unused in practice.

    - A bug fix for, and then the removal of, our custom stack expansion
    checking. We now allow stack expansion up to the rlimit, like other
    architectures.

    - Remove the remnants of our (previously disabled) topology update
    code, which tried to react to NUMA layout changes on virtualised
    systems, but was prone to crashes and other problems.

    - Add PMU support for Power10 CPUs.

    - A change to our signal trampoline so that we don't unbalance the link
    stack (branch return predictor) in the signal delivery path.

    - Lots of other cleanups, refactorings, smaller features and so on as
    usual.

    Thanks to: Abhishek Goel, Alastair D'Silva, Alexander A. Klimov, Alexey
    Kardashevskiy, Alistair Popple, Andrew Donnellan, Aneesh Kumar K.V, Anju
    T Sudhakar, Anton Blanchard, Arnd Bergmann, Athira Rajeev, Balamuruhan
    S, Bharata B Rao, Bill Wendling, Bin Meng, Cédric Le Goater, Chris
    Packham, Christophe Leroy, Christoph Hellwig, Daniel Axtens, Dan
    Williams, David Lamparter, Desnes A. Nunes do Rosario, Erhard F., Finn
    Thain, Frederic Barrat, Ganesh Goudar, Gautham R. Shenoy, Geoff Levand,
    Greg Kurz, Gustavo A. R. Silva, Hari Bathini, Harish, Imre Kaloz, Joel
    Stanley, Joe Perches, John Crispin, Jordan Niethe, Kajol Jain, Kamalesh
    Babulal, Kees Cook, Laurent Dufour, Leonardo Bras, Li RongQing, Madhavan
    Srinivasan, Mahesh Salgaonkar, Mark Cave-Ayland, Michal Suchanek, Milton
    Miller, Mimi Zohar, Murilo Opsfelder Araujo, Nathan Chancellor, Nathan
    Lynch, Naveen N. Rao, Nayna Jain, Nicholas Piggin, Oliver O'Halloran,
    Palmer Dabbelt, Pedro Miraglia Franco de Carvalho, Philippe Bergheaud,
    Pingfan Liu, Pratik Rajesh Sampat, Qian Cai, Qinglang Miao, Randy
    Dunlap, Ravi Bangoria, Sachin Sant, Sam Bobroff, Sandipan Das, Santosh
    Sivaraj, Satheesh Rajendran, Shirisha Ganta, Sourabh Jain, Srikar
    Dronamraju, Stan Johnson, Stephen Rothwell, Thadeu Lima de Souza
    Cascardo, Thiago Jung Bauermann, Tom Lane, Vaibhav Jain, Vladis Dronov,
    Wei Yongjun, Wen Xiong, YueHaibing.

    * tag 'powerpc-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (337 commits)
    selftests/powerpc: Fix pkey syscall redefinitions
    powerpc: Fix circular dependency between percpu.h and mmu.h
    powerpc/powernv/sriov: Fix use of uninitialised variable
    selftests/powerpc: Skip vmx/vsx/tar/etc tests on older CPUs
    powerpc/40x: Fix assembler warning about r0
    powerpc/papr_scm: Add support for fetching nvdimm 'fuel-gauge' metric
    powerpc/papr_scm: Fetch nvdimm performance stats from PHYP
    cpuidle: pseries: Fixup exit latency for CEDE(0)
    cpuidle: pseries: Add function to parse extended CEDE records
    cpuidle: pseries: Set the latency-hint before entering CEDE
    selftests/powerpc: Fix online CPU selection
    powerpc/perf: Consolidate perf_callchain_user_[64|32]()
    powerpc/pseries/hotplug-cpu: Remove double free in error path
    powerpc/pseries/mobility: Add pr_debug() for device tree changes
    powerpc/pseries/mobility: Set pr_fmt()
    powerpc/cacheinfo: Warn if cache object chain becomes unordered
    powerpc/cacheinfo: Improve diagnostics about malformed cache lists
    powerpc/cacheinfo: Use name@unit instead of full DT path in debug messages
    powerpc/cacheinfo: Set pr_fmt()
    powerpc: fix function annotations to avoid section mismatch warnings with gcc-10
    ...

    Linus Torvalds
     

21 Jul, 2020

1 commit

  • The [smp_]read_barrier_depends() barrier macros no longer exist as
    part of the Linux memory model, so remove all references to them from
    the Documentation/ directory.

    Although this is fairly mechanical on the whole, we drop the "CACHE
    COHERENCY" section entirely from 'memory-barriers.txt' as it doesn't
    make any sense now that the dependency barriers have been removed.

    Acked-by: Peter Zijlstra (Intel)
    Acked-by: Paul E. McKenney
    Signed-off-by: Will Deacon

    Will Deacon
     

16 Jul, 2020

1 commit

  • Architectures like ppc64 provide persistent memory specific barriers
    that will ensure that all stores for which the modifications are
    written to persistent storage by preceding dcbfps and dcbstps
    instructions have updated persistent storage before any data
    access or data transfer caused by subsequent instructions is initiated.
    This is in addition to the ordering done by wmb()

    Update nvdimm core such that architecture can use barriers other than
    wmb to ensure all previous writes are architecturally visible for
    the platform buffer flush.

    Signed-off-by: Aneesh Kumar K.V
    Reviewed-by: Dan Williams
    Signed-off-by: Michael Ellerman
    Link: https://lore.kernel.org/r/20200701072235.223558-5-aneesh.kumar@linux.ibm.com

    Aneesh Kumar K.V
     

21 Apr, 2020

1 commit

  • Several references got broken due to txt to ReST conversion.

    Several of them can be automatically fixed with:

    scripts/documentation-file-ref-check --fix

    Reviewed-by: Mathieu Poirier # hwtracing/coresight/Kconfig
    Reviewed-by: Paul E. McKenney # memory-barrier.txt
    Acked-by: Alex Shi # translations/zh_CN
    Acked-by: Federico Vaga # translations/it_IT
    Acked-by: Marc Zyngier # kvm/arm64
    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/6f919ddb83a33b5f2a63b6b5f0575737bb2b36aa.1586881715.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

27 Feb, 2020

1 commit


04 Feb, 2020

1 commit

  • When adding the _{acquire|release|relaxed}() variants of some atomic
    operations, it was forgotten to update Documentation/memory_barrier.txt:

    smp_mb__{before,after}_atomic() is now intended for all RMW operations
    that do not imply a memory barrier.

    1)
    smp_mb__before_atomic();
    atomic_add();

    2)
    smp_mb__before_atomic();
    atomic_xchg_relaxed();

    3)
    smp_mb__before_atomic();
    atomic_fetch_add_relaxed();

    Invalid would be:
    smp_mb__before_atomic();
    atomic_set();

    In addition, the patch splits the long sentence into multiple shorter
    sentences.

    Link: http://lkml.kernel.org/r/20191020123305.14715-2-manfred@colorfullife.com
    Fixes: 654672d4ba1a ("locking/atomics: Add _{acquire|release|relaxed}() variants of some atomic operations")
    Signed-off-by: Manfred Spraul
    Acked-by: Waiman Long
    Cc: Davidlohr Bueso
    Cc: Peter Zijlstra
    Cc: Will Deacon
    Cc: Peter Zijlstra
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Manfred Spraul
     

23 Nov, 2019

1 commit


17 Jul, 2019

1 commit


10 Jul, 2019

1 commit

  • Pull Documentation updates from Jonathan Corbet:
    "It's been a relatively busy cycle for docs:

    - A fair pile of RST conversions, many from Mauro. These create more
    than the usual number of simple but annoying merge conflicts with
    other trees, unfortunately. He has a lot more of these waiting on
    the wings that, I think, will go to you directly later on.

    - A new document on how to use merges and rebases in kernel repos,
    and one on Spectre vulnerabilities.

    - Various improvements to the build system, including automatic
    markup of function() references because some people, for reasons I
    will never understand, were of the opinion that
    :c:func:``function()`` is unattractive and not fun to type.

    - We now recommend using sphinx 1.7, but still support back to 1.4.

    - Lots of smaller improvements, warning fixes, typo fixes, etc"

    * tag 'docs-5.3' of git://git.lwn.net/linux: (129 commits)
    docs: automarkup.py: ignore exceptions when seeking for xrefs
    docs: Move binderfs to admin-guide
    Disable Sphinx SmartyPants in HTML output
    doc: RCU callback locks need only _bh, not necessarily _irq
    docs: format kernel-parameters -- as code
    Doc : doc-guide : Fix a typo
    platform: x86: get rid of a non-existent document
    Add the RCU docs to the core-api manual
    Documentation: RCU: Add TOC tree hooks
    Documentation: RCU: Rename txt files to rst
    Documentation: RCU: Convert RCU UP systems to reST
    Documentation: RCU: Convert RCU linked list to reST
    Documentation: RCU: Convert RCU basic concepts to reST
    docs: filesystems: Remove uneeded .rst extension on toctables
    scripts/sphinx-pre-install: fix out-of-tree build
    docs: zh_CN: submitting-drivers.rst: Remove a duplicated Documentation/
    Documentation: PGP: update for newer HW devices
    Documentation: Add section about CPU vulnerabilities for Spectre
    Documentation: platform: Delete x86-laptop-drivers.txt
    docs: Note that :c:func: should no longer be used
    ...

    Linus Torvalds
     

09 Jun, 2019

1 commit


29 May, 2019

1 commit


23 Apr, 2019

1 commit

  • The revised I/O ordering section of memory-barriers.txt introduced in
    4614bbdee357 ("docs/memory-barriers.txt: Rewrite "KERNEL I/O BARRIER
    EFFECTS" section") loosely refers to "the CPU", whereas the ordering
    guarantees generally apply within a thread of execution that can migrate
    between cores, with the scheduler providing the relevant barrier
    semantics.

    Reword the section to refer to "CPU thread" and call out ordering of
    MMIO writes separately from ordering of writes to memory. Ben also
    spotted that the string accessors are native-endian, so fix that up too.

    Link: https://lkml.kernel.org/r/080d1ec73e3e29d6ffeeeb50b39b613da28afb37.camel@kernel.crashing.org
    Fixes: 4614bbdee357 ("docs/memory-barriers.txt: Rewrite "KERNEL I/O BARRIER EFFECTS" section")
    Reported-by: Benjamin Herrenschmidt
    Signed-off-by: Will Deacon

    Will Deacon
     

11 Apr, 2019

1 commit

  • Commit 4614bbdee357 ("docs/memory-barriers.txt: Rewrite "KERNEL I/O
    BARRIER EFFECTS" section") rewrote the I/O ordering section of
    memory-barriers.txt.

    Subsequently, Ingo noticed a number of issues with the style, spacing
    and grammar of the rewritten section. Fix them based on his suggestions.

    Link: https://lkml.kernel.org/r/20190410105833.GA116161@gmail.com
    Fixes: 4614bbdee357 ("docs/memory-barriers.txt: Rewrite "KERNEL I/O BARRIER EFFECTS" section")
    Reported-by: Ingo Molnar
    Acked-by: Ingo Molnar
    Signed-off-by: Will Deacon

    Will Deacon
     

08 Apr, 2019

2 commits

  • The guarantees provided by mmiowb() are now provided implicitly by
    spin_unlock(), so remove all references to this most confusing of
    barriers from our Documentation.

    Good riddance.

    Acked-by: Linus Torvalds
    Signed-off-by: Will Deacon

    Will Deacon
     
  • The "KERNEL I/O BARRIER EFFECTS" section of memory-barriers.txt is vague,
    x86-centric, out-of-date, incomplete and demonstrably incorrect in places.
    This is largely because I/O ordering is a horrible can of worms, but also
    because the document has stagnated as our understanding has evolved.

    Attempt to address some of that, by rewriting the section based on
    recent(-ish) discussions with Arnd, BenH and others. Maybe one day we'll
    find a way to formalise this stuff, but for now let's at least try to
    make the English easier to understand.

    Cc: Benjamin Herrenschmidt
    Cc: Michael Ellerman
    Cc: Arnd Bergmann
    Cc: Peter Zijlstra
    Cc: Andrea Parri
    Cc: Palmer Dabbelt
    Cc: Daniel Lustig
    Cc: David Howells
    Cc: Alan Stern
    Cc: "Maciej W. Rozycki"
    Cc: Mikulas Patocka
    Acked-by: Linus Torvalds
    Reviewed-by: Paul E. McKenney
    Signed-off-by: Will Deacon

    Will Deacon
     

21 Nov, 2018

1 commit

  • Whilst making an unrelated change to some Documentation, Linus sayeth:

    | Afaik, even in Britain, "whilst" is unusual and considered more
    | formal, and "while" is the common word.
    |
    | [...]
    |
    | Can we just admit that we work with computers, and we don't need to
    | use þe eald Englisc spelling of words that most of the world never
    | uses?

    dictionary.com refers to the word as "Chiefly British", which is
    probably an undesirable attribute for technical documentation.

    Replace all occurrences under Documentation/ with "while".

    Cc: David Howells
    Cc: Liam Girdwood
    Cc: Chris Wilson
    Cc: Michael Halcrow
    Cc: Jonathan Corbet
    Reported-by: Linus Torvalds
    Signed-off-by: Will Deacon
    Signed-off-by: Jonathan Corbet

    Will Deacon
     

02 Oct, 2018

1 commit

  • Amend the changes in commit:

    1f03e8d2919270 ("locking/barriers: Replace smp_cond_acquire() with smp_cond_load_acquire()")

    ... by updating the documentation accordingly.

    Also remove some obsolete information related to the implementation.

    Signed-off-by: Andrea Parri
    Signed-off-by: Paul E. McKenney
    Acked-by: Will Deacon
    Acked-by: Alan Stern
    Cc: Akira Yokosawa
    Cc: Alexander Shishkin
    Cc: Arnaldo Carvalho de Melo
    Cc: Boqun Feng
    Cc: Daniel Lustig
    Cc: David Howells
    Cc: Jade Alglave
    Cc: Jiri Olsa
    Cc: Jonathan Corbet
    Cc: Linus Torvalds
    Cc: Luc Maranget
    Cc: Nicholas Piggin
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Thomas Gleixner
    Cc: Vince Weaver
    Cc: linux-arch@vger.kernel.org
    Cc: parri.andrea@gmail.com
    Link: http://lkml.kernel.org/r/20180926182920.27644-5-paulmck@linux.ibm.com
    Signed-off-by: Ingo Molnar

    Andrea Parri
     

17 Jul, 2018

1 commit

  • Both the implementation and the users' expectation [1] for the various
    wakeup primitives have evolved over time, but the documentation has not
    kept up with these changes: brings it into 2018.

    [1] http://lkml.kernel.org/r/20180424091510.GB4064@hirez.programming.kicks-ass.net

    Also applied feedback from Alan Stern.

    Suggested-by: Peter Zijlstra
    Signed-off-by: Andrea Parri
    Signed-off-by: Paul E. McKenney
    Acked-by: Peter Zijlstra (Intel)
    Cc: Akira Yokosawa
    Cc: Alan Stern
    Cc: Boqun Feng
    Cc: Daniel Lustig
    Cc: David Howells
    Cc: Jade Alglave
    Cc: Jonathan Corbet
    Cc: Linus Torvalds
    Cc: Luc Maranget
    Cc: Nicholas Piggin
    Cc: Thomas Gleixner
    Cc: Will Deacon
    Cc: linux-arch@vger.kernel.org
    Cc: parri.andrea@gmail.com
    Link: http://lkml.kernel.org/r/20180716180605.16115-12-paulmck@linux.vnet.ibm.com
    Signed-off-by: Ingo Molnar

    Andrea Parri
     

05 Jun, 2018

1 commit

  • Pull locking updates from Ingo Molnar:

    - Lots of tidying up changes all across the map for Linux's formal
    memory/locking-model tooling, by Alan Stern, Akira Yokosawa, Andrea
    Parri, Paul E. McKenney and SeongJae Park.

    Notable changes beyond an overall update in the tooling itself is the
    tidying up of spin_is_locked() semantics, which spills over into the
    kernel proper as well.

    - qspinlock improvements: the locking algorithm now guarantees forward
    progress whereas the previous implementation in mainline could starve
    threads indefinitely in cmpxchg() loops. Also other related cleanups
    to the qspinlock code (Will Deacon)

    - misc smaller improvements, cleanups and fixes all across the locking
    subsystem

    * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (51 commits)
    locking/rwsem: Simplify the is-owner-spinnable checks
    tools/memory-model: Add reference for 'Simplifying ARM concurrency'
    tools/memory-model: Update ASPLOS information
    MAINTAINERS, tools/memory-model: Update e-mail address for Andrea Parri
    tools/memory-model: Fix coding style in 'lock.cat'
    tools/memory-model: Remove out-of-date comments and code from lock.cat
    tools/memory-model: Improve mixed-access checking in lock.cat
    tools/memory-model: Improve comments in lock.cat
    tools/memory-model: Remove duplicated code from lock.cat
    tools/memory-model: Flag "cumulativity" and "propagation" tests
    tools/memory-model: Add model support for spin_is_locked()
    tools/memory-model: Add scripts to test memory model
    tools/memory-model: Fix coding style in 'linux-kernel.def'
    tools/memory-model: Model 'smp_store_mb()'
    tools/memory-order: Update the cheat-sheet to show that smp_mb__after_atomic() orders later RMW operations
    tools/memory-order: Improve key for SELF and SV
    tools/memory-model: Fix cheat sheet typo
    tools/memory-model: Update required version of herdtools7
    tools/memory-model: Redefine rb in terms of rcu-fence
    tools/memory-model: Rename link and rcu-path to rcu-link and rb
    ...

    Linus Torvalds
     

15 May, 2018

1 commit

  • The section of memory-barriers.txt that describes the dma_Xmb() barriers
    has an incorrect example claiming that a wmb() is required after writing
    to coherent memory in order for those writes to be visible to a device
    before a subsequent MMIO access using writel() can reach the device.

    In fact, this ordering guarantee is provided (at significant cost on some
    architectures such as arm and power) by writel, so the wmb() is not
    necessary. writel_relaxed exists for cases where this ordering is not
    required.

    Fix the example and update the text to make this clearer.

    Reported-by: Sinan Kaya
    Signed-off-by: Will Deacon
    Signed-off-by: Paul E. McKenney
    Cc: Andrew Morton
    Cc: Arnd Bergmann
    Cc: Benjamin Herrenschmidt
    Cc: Jason Gunthorpe
    Cc: Jonathan Corbet
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: akiyks@gmail.com
    Cc: boqun.feng@gmail.com
    Cc: dhowells@redhat.com
    Cc: j.alglave@ucl.ac.uk
    Cc: linux-arch@vger.kernel.org
    Cc: luc.maranget@inria.fr
    Cc: npiggin@gmail.com
    Cc: parri.andrea@gmail.com
    Cc: stern@rowland.harvard.edu
    Link: http://lkml.kernel.org/r/1526338533-6044-1-git-send-email-paulmck@linux.vnet.ibm.com
    Signed-off-by: Ingo Molnar

    Will Deacon
     

09 May, 2018

2 commits


10 Mar, 2018

1 commit

  • This commit makes further changes to memory-barrier.txt to further
    de-emphasize smp_read_barrier_depends(), but leaving some discussion
    for historical purposes.

    Signed-off-by: Paul E. McKenney
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: akiyks@gmail.com
    Cc: boqun.feng@gmail.com
    Cc: dhowells@redhat.com
    Cc: j.alglave@ucl.ac.uk
    Cc: linux-arch@vger.kernel.org
    Cc: luc.maranget@inria.fr
    Cc: npiggin@gmail.com
    Cc: parri.andrea@gmail.com
    Cc: stern@rowland.harvard.edu
    Cc: will.deacon@arm.com
    Link: http://lkml.kernel.org/r/1520443660-16858-1-git-send-email-paulmck@linux.vnet.ibm.com
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     

21 Feb, 2018

2 commits

  • In the description of data dependency barriers the words 'before' is
    used erroneously. Since such barrier order dependent loads one after
    the other. So substitute 'before' with 'after'.

    Signed-off-by: Nikolay Borisov
    Signed-off-by: Paul E. McKenney
    Acked-by: Peter Zijlstra
    Cc: Linus Torvalds
    Cc: Thomas Gleixner
    Cc: akiyks@gmail.com
    Cc: boqun.feng@gmail.com
    Cc: dhowells@redhat.com
    Cc: j.alglave@ucl.ac.uk
    Cc: linux-arch@vger.kernel.org
    Cc: luc.maranget@inria.fr
    Cc: npiggin@gmail.com
    Cc: parri.andrea@gmail.com
    Cc: stern@rowland.harvard.edu
    Cc: will.deacon@arm.com
    Link: http://lkml.kernel.org/r/1519169112-20593-8-git-send-email-paulmck@linux.vnet.ibm.com
    Signed-off-by: Ingo Molnar

    Nikolay Borisov
     
  • A memory consistency model is now available for the Linux kernel [1],
    which "can (roughly speaking) be thought of as an automated version of
    memory-barriers.txt" and which is (in turn) "accompanied by extensive
    documentation on its use and its design".

    Inform the (occasional) reader of memory-barriers.txt of these
    developments.

    [1] https://marc.info/?l=linux-kernel&m=151687290114799&w=2

    Co-developed-by: Andrea Parri
    Co-developed-by: Akira Yokosawa
    Signed-off-by: Andrea Parri
    Signed-off-by: Akira Yokosawa
    Signed-off-by: Paul E. McKenney
    Acked-by: Peter Zijlstra
    Cc: Linus Torvalds
    Cc: Thomas Gleixner
    Cc: boqun.feng@gmail.com
    Cc: dhowells@redhat.com
    Cc: j.alglave@ucl.ac.uk
    Cc: linux-arch@vger.kernel.org
    Cc: luc.maranget@inria.fr
    Cc: nborisov@suse.com
    Cc: npiggin@gmail.com
    Cc: stern@rowland.harvard.edu
    Cc: will.deacon@arm.com
    Link: http://lkml.kernel.org/r/1519169112-20593-7-git-send-email-paulmck@linux.vnet.ibm.com
    Signed-off-by: Ingo Molnar

    Andrea Parri
     

06 Dec, 2017

1 commit


05 Dec, 2017

1 commit


14 Nov, 2017

1 commit

  • Pull core locking updates from Ingo Molnar:
    "The main changes in this cycle are:

    - Another attempt at enabling cross-release lockdep dependency
    tracking (automatically part of CONFIG_PROVE_LOCKING=y), this time
    with better performance and fewer false positives. (Byungchul Park)

    - Introduce lockdep_assert_irqs_enabled()/disabled() and convert
    open-coded equivalents to lockdep variants. (Frederic Weisbecker)

    - Add down_read_killable() and use it in the VFS's iterate_dir()
    method. (Kirill Tkhai)

    - Convert remaining uses of ACCESS_ONCE() to
    READ_ONCE()/WRITE_ONCE(). Most of the conversion was Coccinelle
    driven. (Mark Rutland, Paul E. McKenney)

    - Get rid of lockless_dereference(), by strengthening Alpha atomics,
    strengthening READ_ONCE() with smp_read_barrier_depends() and thus
    being able to convert users of lockless_dereference() to
    READ_ONCE(). (Will Deacon)

    - Various micro-optimizations:

    - better PV qspinlocks (Waiman Long),
    - better x86 barriers (Michael S. Tsirkin)
    - better x86 refcounts (Kees Cook)

    - ... plus other fixes and enhancements. (Borislav Petkov, Juergen
    Gross, Miguel Bernal Marin)"

    * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (70 commits)
    locking/x86: Use LOCK ADD for smp_mb() instead of MFENCE
    rcu: Use lockdep to assert IRQs are disabled/enabled
    netpoll: Use lockdep to assert IRQs are disabled/enabled
    timers/posix-cpu-timers: Use lockdep to assert IRQs are disabled/enabled
    sched/clock, sched/cputime: Use lockdep to assert IRQs are disabled/enabled
    irq_work: Use lockdep to assert IRQs are disabled/enabled
    irq/timings: Use lockdep to assert IRQs are disabled/enabled
    perf/core: Use lockdep to assert IRQs are disabled/enabled
    x86: Use lockdep to assert IRQs are disabled/enabled
    smp/core: Use lockdep to assert IRQs are disabled/enabled
    timers/hrtimer: Use lockdep to assert IRQs are disabled/enabled
    timers/nohz: Use lockdep to assert IRQs are disabled/enabled
    workqueue: Use lockdep to assert IRQs are disabled/enabled
    irq/softirqs: Use lockdep to assert IRQs are disabled/enabled
    locking/lockdep: Add IRQs disabled/enabled assertion APIs: lockdep_assert_irqs_enabled()/disabled()
    locking/pvqspinlock: Implement hybrid PV queued/unfair locks
    locking/rwlocks: Fix comments
    x86/paravirt: Set up the virt_spin_lock_key after static keys get initialized
    block, locking/lockdep: Assign a lock_class per gendisk used for wait_for_completion()
    workqueue: Remove now redundant lock acquisitions wrt. workqueue flushes
    ...

    Linus Torvalds
     

24 Oct, 2017

1 commit

  • lockless_dereference() is a nice idea, but it gained little traction in
    kernel code since its introduction three years ago. This is partly
    because it's a pain to type, but also because using READ_ONCE() instead
    has worked correctly on all architectures apart from Alpha, which is a
    fully supported but somewhat niche architecture these days.

    Now that READ_ONCE() has been upgraded to contain an implicit
    smp_read_barrier_depends() and the few callers of lockless_dereference()
    have been converted, we can remove lockless_dereference() altogether.

    Signed-off-by: Will Deacon
    Cc: Linus Torvalds
    Cc: Paul E. McKenney
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1508840570-22169-5-git-send-email-will.deacon@arm.com
    Signed-off-by: Ingo Molnar

    Will Deacon
     

21 Oct, 2017

2 commits

  • The "Write (or store) memory barriers" bullet of the "Variety of memory
    barriers" section, calls out a sequential order of stores, which is
    confusing since sequential ordering is not guaranteed.

    This commit therefore rewords to avoid mentioning a sequence of stores
    to clarify the intent.

    Cc: Paul E. McKenney
    Signed-off-by: Guilherme G. Piccoli
    Signed-off-by: Paul E. McKenney

    Guilherme G. Piccoli
     
  • In the "general barrier pairing with implicit control depdendency"
    example, the last write by CPU 1 was meant to change variable x and not
    y. The example would be pretty uninteresting if no CPU ever changes x
    and the variable was initialized to zero.

    Signed-off-by: Scott Tsai
    Signed-off-by: Paul E. McKenney

    Scott Tsai
     

10 Oct, 2017

2 commits


05 Sep, 2017

1 commit

  • Pull locking updates from Ingo Molnar:

    - Add 'cross-release' support to lockdep, which allows APIs like
    completions, where it's not the 'owner' who releases the lock, to be
    tracked. It's all activated automatically under
    CONFIG_PROVE_LOCKING=y.

    - Clean up (restructure) the x86 atomics op implementation to be more
    readable, in preparation of KASAN annotations. (Dmitry Vyukov)

    - Fix static keys (Paolo Bonzini)

    - Add killable versions of down_read() et al (Kirill Tkhai)

    - Rework and fix jump_label locking (Marc Zyngier, Paolo Bonzini)

    - Rework (and fix) tlb_flush_pending() barriers (Peter Zijlstra)

    - Remove smp_mb__before_spinlock() and convert its usages, introduce
    smp_mb__after_spinlock() (Peter Zijlstra)

    * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (56 commits)
    locking/lockdep/selftests: Fix mixed read-write ABBA tests
    sched/completion: Avoid unnecessary stack allocation for COMPLETION_INITIALIZER_ONSTACK()
    acpi/nfit: Fix COMPLETION_INITIALIZER_ONSTACK() abuse
    locking/pvqspinlock: Relax cmpxchg's to improve performance on some architectures
    smp: Avoid using two cache lines for struct call_single_data
    locking/lockdep: Untangle xhlock history save/restore from task independence
    locking/refcounts, x86/asm: Disable CONFIG_ARCH_HAS_REFCOUNT for the time being
    futex: Remove duplicated code and fix undefined behaviour
    Documentation/locking/atomic: Finish the document...
    locking/lockdep: Fix workqueue crossrelease annotation
    workqueue/lockdep: 'Fix' flush_work() annotation
    locking/lockdep/selftests: Add mixed read-write ABBA tests
    mm, locking/barriers: Clarify tlb_flush_pending() barriers
    locking/lockdep: Make CONFIG_LOCKDEP_CROSSRELEASE and CONFIG_LOCKDEP_COMPLETIONS truly non-interactive
    locking/lockdep: Explicitly initialize wq_barrier::done::map
    locking/lockdep: Rename CONFIG_LOCKDEP_COMPLETE to CONFIG_LOCKDEP_COMPLETIONS
    locking/lockdep: Reword title of LOCKDEP_CROSSRELEASE config
    locking/lockdep: Make CONFIG_LOCKDEP_CROSSRELEASE part of CONFIG_PROVE_LOCKING
    locking/refcounts, x86/asm: Implement fast refcount overflow protection
    locking/lockdep: Fix the rollback and overwrite detection logic in crossrelease
    ...

    Linus Torvalds
     

17 Aug, 2017

1 commit

  • The memory-barriers.txt document contains an obsolete passage stating that
    smp_read_barrier_depends() is required to force ordering for read-to-write
    dependencies. We now know that this is not required, even for DEC Alpha.
    This commit therefore updates this passage to state that read-to-write
    dependencies are respected even without smp_read_barrier_depends().

    Reported-by: Lance Roy
    Signed-off-by: Paul E. McKenney
    Cc: David Howells
    Cc: Peter Zijlstra
    Cc: Jonathan Corbet
    Cc: Alan Stern
    Cc: Andrea Parri
    Cc: Jade Alglave
    Cc: Luc Maranget
    [ paulmck: Reference control-dependencies sections and use WRITE_ONCE()
    per Will Deacon. Correctly place split-cache paragraph while there. ]
    Acked-by: Will Deacon

    Paul E. McKenney
     

10 Aug, 2017

2 commits

  • Now that there are no users of smp_mb__before_spinlock() left, remove
    it entirely.

    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Since we've vastly expanded the atomic_t interface in recent years the
    existing documentation is woefully out of date and people seem to get
    confused a bit.

    Start a new document to hopefully better explain the current state of
    affairs.

    The old atomic_ops.txt also covers bitmaps and a few more details so
    this is not a full replacement and we'll therefore keep that document
    around until such a time that we've managed to write more text to cover
    its entire.

    Also please, ReST people, go away.

    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Boqun Feng
    Cc: Linus Torvalds
    Cc: Paul McKenney
    Cc: Peter Zijlstra
    Cc: Randy Dunlap
    Cc: Thomas Gleixner
    Cc: Will Deacon
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

14 Jul, 2017

1 commit

  • Pull documentation fixes from Jonathan Corbet:
    "A set of fixes for various warnings, including the one caused by the
    removal of kernel/rcu/srcu.c. Also correct a stray pointer in
    memory-barriers.txt"

    * tag '4.13-fixes' of git://git.lwn.net/linux:
    kokr/memory-barriers.txt: Fix obsolete link to atomic_ops.txt
    memory-barriers.txt: Fix broken link to atomic_ops.txt
    docs: Turn off section numbering for the input docs
    docs: Include uaccess docs from the right file
    docs: Do not include from kernel/rcu/srcu.c

    Linus Torvalds
     

13 Jul, 2017

1 commit