14 Sep, 2019

1 commit


17 Jul, 2019

1 commit


15 Jul, 2019

2 commits

  • The locking directory is part of the Kernel API bookset. Add
    it to the index file.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Convert the locking documents to ReST and add them to the
    kernel development book where it belongs.

    Most of the stuff here is just to make Sphinx to properly
    parse the text file, as they're already in good shape,
    not requiring massive changes in order to be parsed.

    The conversion is actually:
    - add blank lines and identation in order to identify paragraphs;
    - fix tables markups;
    - add some lists markups;
    - mark literal blocks;
    - adjust title markups.

    At its new index.rst, let's add a :orphan: while this is not linked to
    the main index.rst file, in order to avoid build warnings.

    Signed-off-by: Mauro Carvalho Chehab
    Acked-by: Federico Vaga

    Mauro Carvalho Chehab
     

03 Jun, 2019

2 commits

  • The irq usage and lock dependency rules that if violated a deacklock may
    happen are explained in more detail.

    Signed-off-by: Yuyang Du
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: bvanassche@acm.org
    Cc: frederic@kernel.org
    Cc: ming.lei@redhat.com
    Cc: will.deacon@arm.com
    Link: https://lkml.kernel.org/r/20190506081939.74287-17-duyuyang@gmail.com
    Signed-off-by: Ingo Molnar

    Yuyang Du
     
  • More words are added to lockdep design document regarding key concepts,
    which should help people without lockdep experience read and understand
    lockdep reports.

    Signed-off-by: Yuyang Du
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: bvanassche@acm.org
    Cc: frederic@kernel.org
    Cc: ming.lei@redhat.com
    Cc: will.deacon@arm.com
    Link: https://lkml.kernel.org/r/20190506081939.74287-3-duyuyang@gmail.com
    Signed-off-by: Ingo Molnar

    Yuyang Du
     

05 Mar, 2019

1 commit


25 Oct, 2018

1 commit

  • Pull documentation updates from Jonathan Corbet:
    "This is a fairly typical cycle for documentation. There's some welcome
    readability improvements for the formatted output, some LICENSES
    updates including the addition of the ISC license, the removal of the
    unloved and unmaintained 00-INDEX files, the deprecated APIs document
    from Kees, more MM docs from Mike Rapoport, and the usual pile of typo
    fixes and corrections"

    * tag 'docs-4.20' of git://git.lwn.net/linux: (41 commits)
    docs: Fix typos in histogram.rst
    docs: Introduce deprecated APIs list
    kernel-doc: fix declaration type determination
    doc: fix a typo in adding-syscalls.rst
    docs/admin-guide: memory-hotplug: remove table of contents
    doc: printk-formats: Remove bogus kobject references for device nodes
    Documentation: preempt-locking: Use better example
    dm flakey: Document "error_writes" feature
    docs/completion.txt: Fix a couple of punctuation nits
    LICENSES: Add ISC license text
    LICENSES: Add note to CDDL-1.0 license that it should not be used
    docs/core-api: memory-hotplug: add some details about locking internals
    docs/core-api: rename memory-hotplug-notifier to memory-hotplug
    docs: improve readability for people with poorer eyesight
    yama: clarify ptrace_scope=2 in Yama documentation
    docs/vm: split memory hotplug notifier description to Documentation/core-api
    docs: move memory hotplug description into admin-guide/mm
    doc: Fix acronym "FEKEK" in ecryptfs
    docs: fix some broken documentation references
    iommu: Fix passthrough option documentation
    ...

    Linus Torvalds
     

02 Oct, 2018

1 commit

  • Fix incorrect line number in example output

    Signed-off-by: Andrew Murray
    Cc: Jiri Kosina
    Cc: Jonathan Corbet
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: Will Deacon
    Cc: linux-doc@vger.kernel.org
    Link: http://lkml.kernel.org/r/1538391663-54524-1-git-send-email-andrew.murray@arm.com
    Signed-off-by: Ingo Molnar

    Andrew Murray
     

10 Sep, 2018

1 commit

  • This is a respin with a wider audience (all that get_maintainer returned)
    and I know this spams a *lot* of people. Not sure what would be the correct
    way, so my apologies for ruining your inbox.

    The 00-INDEX files are supposed to give a summary of all files present
    in a directory, but these files are horribly out of date and their
    usefulness is brought into question. Often a simple "ls" would reveal
    the same information as the filenames are generally quite descriptive as
    a short introduction to what the file covers (it should not surprise
    anyone what Documentation/sched/sched-design-CFS.txt covers)

    A few years back it was mentioned that these files were no longer really
    needed, and they have since then grown further out of date, so perhaps
    it is time to just throw them out.

    A short status yields the following _outdated_ 00-INDEX files, first
    counter is files listed in 00-INDEX but missing in the directory, last
    is files present but not listed in 00-INDEX.

    List of outdated 00-INDEX:
    Documentation: (4/10)
    Documentation/sysctl: (0/1)
    Documentation/timers: (1/0)
    Documentation/blockdev: (3/1)
    Documentation/w1/slaves: (0/1)
    Documentation/locking: (0/1)
    Documentation/devicetree: (0/5)
    Documentation/power: (1/1)
    Documentation/powerpc: (0/5)
    Documentation/arm: (1/0)
    Documentation/x86: (0/9)
    Documentation/x86/x86_64: (1/1)
    Documentation/scsi: (4/4)
    Documentation/filesystems: (2/9)
    Documentation/filesystems/nfs: (0/2)
    Documentation/cgroup-v1: (0/2)
    Documentation/kbuild: (0/4)
    Documentation/spi: (1/0)
    Documentation/virtual/kvm: (1/0)
    Documentation/scheduler: (0/2)
    Documentation/fb: (0/1)
    Documentation/block: (0/1)
    Documentation/networking: (6/37)
    Documentation/vm: (1/3)

    Then there are 364 subdirectories in Documentation/ with several files that
    are missing 00-INDEX alltogether (and another 120 with a single file and no
    00-INDEX).

    I don't really have an opinion to whether or not we /should/ have 00-INDEX,
    but the above 00-INDEX should either be removed or be kept up to date. If
    we should keep the files, I can try to keep them updated, but I rather not
    if we just want to delete them anyway.

    As a starting point, remove all index-files and references to 00-INDEX and
    see where the discussion is going.

    Signed-off-by: Henrik Austad
    Acked-by: "Paul E. McKenney"
    Just-do-it-by: Steven Rostedt
    Reviewed-by: Jens Axboe
    Acked-by: Paul Moore
    Acked-by: Greg Kroah-Hartman
    Acked-by: Mark Brown
    Acked-by: Mike Rapoport
    Cc: [Almost everybody else]
    Signed-off-by: Jonathan Corbet

    Henrik Austad
     

03 Jul, 2018

2 commits

  • The current Wound-Wait mutex algorithm is actually not Wound-Wait but
    Wait-Die. Implement also Wound-Wait as a per-ww-class choice. Wound-Wait
    is, contrary to Wait-Die a preemptive algorithm and is known to generate
    fewer backoffs. Testing reveals that this is true if the
    number of simultaneous contending transactions is small.
    As the number of simultaneous contending threads increases, Wait-Wound
    becomes inferior to Wait-Die in terms of elapsed time.
    Possibly due to the larger number of held locks of sleeping transactions.

    Update documentation and callers.

    Timings using git://people.freedesktop.org/~thomash/ww_mutex_test
    tag patch-18-06-15

    Each thread runs 100000 batches of lock / unlock 800 ww mutexes randomly
    chosen out of 100000. Four core Intel x86_64:

    Algorithm #threads Rollbacks time
    Wound-Wait 4 ~100 ~17s.
    Wait-Die 4 ~150000 ~19s.
    Wound-Wait 16 ~360000 ~109s.
    Wait-Die 16 ~450000 ~82s.

    Cc: Ingo Molnar
    Cc: Jonathan Corbet
    Cc: Gustavo Padovan
    Cc: Maarten Lankhorst
    Cc: Sean Paul
    Cc: David Airlie
    Cc: Davidlohr Bueso
    Cc: "Paul E. McKenney"
    Cc: Josh Triplett
    Cc: Thomas Gleixner
    Cc: Kate Stewart
    Cc: Philippe Ombredanne
    Cc: Greg Kroah-Hartman
    Cc: linux-doc@vger.kernel.org
    Cc: linux-media@vger.kernel.org
    Cc: linaro-mm-sig@lists.linaro.org
    Co-authored-by: Peter Zijlstra
    Signed-off-by: Thomas Hellstrom
    Acked-by: Peter Zijlstra (Intel)
    Acked-by: Ingo Molnar

    Thomas Hellstrom
     
  • Make the WW mutex code more readable by adding comments, splitting up
    functions and pointing out that we're actually using the Wait-Die
    algorithm.

    Cc: Ingo Molnar
    Cc: Jonathan Corbet
    Cc: Gustavo Padovan
    Cc: Maarten Lankhorst
    Cc: Sean Paul
    Cc: David Airlie
    Cc: Davidlohr Bueso
    Cc: "Paul E. McKenney"
    Cc: Josh Triplett
    Cc: Thomas Gleixner
    Cc: Kate Stewart
    Cc: Philippe Ombredanne
    Cc: Greg Kroah-Hartman
    Cc: linux-doc@vger.kernel.org
    Cc: linux-media@vger.kernel.org
    Cc: linaro-mm-sig@lists.linaro.org
    Co-authored-by: Thomas Hellstrom
    Signed-off-by: Peter Zijlstra (Intel)
    Signed-off-by: Thomas Hellstrom
    Acked-by: Ingo Molnar

    Peter Ziljstra
     

21 Feb, 2018

1 commit


14 Feb, 2018

2 commits

  • Add section about annotations that can be used to perform additional runtime
    checking of locking correctness: assert that certain locks are held and
    prevent accidental unlocking.

    Signed-off-by: Juri Lelli
    Acked-by: Peter Zijlstra (Intel)
    Cc: Jonathan Corbet
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-doc@vger.kernel.org
    Link: http://lkml.kernel.org/r/20180213185519.18186-3-juri.lelli@redhat.com
    Signed-off-by: Ingo Molnar

    Juri Lelli
     
  • Commit:

    d92a8cfcb37e ("locking/lockdep: Rework FS_RECLAIM annotation")

    removed the 'reclaim_fs' lockdep STATE.

    Reflect the change in the documentation.

    While we are at it, also clarify the formula to calculate the number of state bits.

    Signed-off-by: Juri Lelli
    Acked-by: Peter Zijlstra (Intel)
    Cc: Jonathan Corbet
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-doc@vger.kernel.org
    Link: http://lkml.kernel.org/r/20180213185519.18186-2-juri.lelli@redhat.com
    Signed-off-by: Ingo Molnar

    Juri Lelli
     

11 Feb, 2018

1 commit

  • Commit 3ca0ff571b09 ("locking/mutex: Rework mutex::owner") reworked the
    basic mutex implementation to deal with several problems. Documentation
    was however left unchanged and became stale.

    Update mutex-design.txt to reflect changes introduced by the above commit.

    Signed-off-by: Juri Lelli
    Cc: Andrew Morton
    Cc: Davidlohr Bueso
    Cc: Jonathan Corbet
    Cc: Linus Torvalds
    Cc: Paul E. McKenney
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-doc@vger.kernel.org
    Link: http://lkml.kernel.org/r/20180209160114.19980-1-juri.lelli@redhat.com
    [ Small readability tweaks to the text. ]
    Signed-off-by: Ingo Molnar

    Juri Lelli
     

03 Jan, 2018

1 commit

  • …k/linux-rcu into core/rcu

    Pull RCU updates from Paul E. McKenney:

    - Updates to use cond_resched() instead of cond_resched_rcu_qs()
    where feasible (currently everywhere except in kernel/rcu and
    in kernel/torture.c). Also a couple of fixes to avoid sending
    IPIs to offline CPUs.

    - Updates to simplify RCU's dyntick-idle handling.

    - Updates to remove almost all uses of smp_read_barrier_depends()
    and read_barrier_depends().

    - Miscellaneous fixes.

    - Torture-test updates.

    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     

12 Dec, 2017

2 commits

  • This code (CONFIG_LOCKDEP_CROSSRELEASE=y and CONFIG_LOCKDEP_COMPLETIONS=y),
    while it found a number of old bugs initially, was also causing too many
    false positives that caused people to disable lockdep - which is arguably
    a worse overall outcome.

    If we disable cross-release by default but keep the code upstream then
    in practice the most likely outcome is that we'll allow the situation
    to degrade gradually, by allowing entropy to introduce more and more
    false positives, until it overwhelms maintenance capacity.

    Another bad side effect was that people were trying to work around
    the false positives by uglifying/complicating unrelated code. There's
    a marked difference between annotating locking operations and
    uglifying good code just due to bad lock debugging code ...

    This gradual decrease in quality happened to a number of debugging
    facilities in the kernel, and lockdep is pretty complex already,
    so we cannot risk this outcome.

    Either cross-release checking can be done right with no false positives,
    or it should not be included in the upstream kernel.

    ( Note that it might make sense to maintain it out of tree and go through
    the false positives every now and then and see whether new bugs were
    introduced. )

    Cc: Byungchul Park
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • The purpose of torture_runnable is to allow rcutorture and locktorture
    to be started and stopped via sysfs when they are built into the kernel
    (as in not compiled as loadable modules). However, the 0444 permissions
    for both instances of torture_runnable prevent this use case from ever
    being put into practice. Given that there have been no complaints
    about this deficiency, it is reasonable to conclude that no one actually
    makes use of this sysfs capability. The perf_runnable module parameter
    for rcuperf is in the same situation.

    This commit therefore removes both torture_runnable instances as well
    as perf_runnable.

    Reported-by: Thomas Gleixner
    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     

20 Oct, 2017

1 commit


04 Sep, 2017

1 commit


25 Aug, 2017

2 commits

  • The rtmutex remove a pending owner bit in in rt_mutex::owner, in
    commit 8161239a8bcc ("rtmutex: Simplify PI algorithm and make highest prio task get lock")
    But the document was changed accordingly. Updating it to a meaningful
    state.

    BTW, as 'Steven Rostedt' mentioned:
    There is still technically a "Pending Owner", it's just not called
    that anymore. The pending owner happens to be the top_waiter of a lock
    that has no owner and has been woken up to grab the lock.

    Signed-off-by: Alex Shi
    Cc: Steven Rostedt
    Cc: Sebastian Siewior
    Cc: Mathieu Poirier
    Cc: Juri Lelli
    Cc: Thomas Gleixner
    To: linux-doc@vger.kernel.org
    To: linux-kernel@vger.kernel.org
    To: Jonathan Corbet
    To: Ingo Molnar
    To: Peter Zijlstra
    Signed-off-by: Jonathan Corbet

    Alex Shi
     
  • The rt-mutex-design documents didn't gotten meaningful update from its
    first version. Even after owner's pending bit was removed in commit 8161239a8bcc
    ("rtmutex: Simplify PI algorithm and make highest prio task get lock")
    and priority list 'plist' changed to rbtree. And Peter Zijlstra did some
    clean up and fix for deadline task changes on tip tree.

    So update it to latest code and make it meaningful.
    Steven Rostedt and Sebastian Siewior gave much of comments and input
    in this doc. Thanks!

    Signed-off-by: Alex Shi
    Cc: Steven Rostedt
    Cc: Sebastian Siewior
    Cc: Mathieu Poirier
    Cc: Juri Lelli
    Cc: Thomas Gleixner
    To: linux-doc@vger.kernel.org
    To: linux-kernel@vger.kernel.org
    To: Jonathan Corbet
    To: Ingo Molnar
    To: Peter Zijlstra
    Signed-off-by: Jonathan Corbet

    Alex Shi
     

10 Aug, 2017

1 commit

  • This document describes the concept of crossrelease feature.

    Signed-off-by: Byungchul Park
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: akpm@linux-foundation.org
    Cc: boqun.feng@gmail.com
    Cc: kernel-team@lge.com
    Cc: kirill@shutemov.name
    Cc: npiggin@gmail.com
    Cc: walken@google.com
    Cc: willy@infradead.org
    Link: http://lkml.kernel.org/r/1502089981-21272-15-git-send-email-byungchul.park@lge.com
    Signed-off-by: Ingo Molnar

    Byungchul Park
     

14 Jan, 2017

1 commit

  • Document the invariants we maintain for the wait list of ww_mutexes.

    Signed-off-by: Nicolai Hähnle
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Andrew Morton
    Cc: Chris Wilson
    Cc: Daniel Vetter
    Cc: Linus Torvalds
    Cc: Maarten Lankhorst
    Cc: Paul E. McKenney
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: dri-devel@lists.freedesktop.org
    Link: http://lkml.kernel.org/r/1482346000-9927-13-git-send-email-nhaehnle@gmail.com
    Signed-off-by: Ingo Molnar

    Nicolai Hähnle
     

22 Sep, 2016

1 commit


28 Apr, 2016

1 commit


04 Nov, 2015

1 commit

  • Pull locking changes from Ingo Molnar:
    "The main changes in this cycle were:

    - More gradual enhancements to atomic ops: new atomic*_read_ctrl()
    ops, synchronize atomic_{read,set}() ordering requirements between
    architectures, add atomic_long_t bitops. (Peter Zijlstra)

    - Add _{relaxed|acquire|release}() variants for inc/dec atomics and
    use them in various locking primitives: mutex, rtmutex, mcs, rwsem.
    This enables weakly ordered architectures (such as arm64) to make
    use of more locking related optimizations. (Davidlohr Bueso)

    - Implement atomic[64]_{inc,dec}_relaxed() on ARM. (Will Deacon)

    - Futex kernel data cache footprint micro-optimization. (Rasmus
    Villemoes)

    - pvqspinlock runtime overhead micro-optimization. (Waiman Long)

    - misc smaller fixlets"

    * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    ARM, locking/atomics: Implement _relaxed variants of atomic[64]_{inc,dec}
    locking/rwsem: Use acquire/release semantics
    locking/mcs: Use acquire/release semantics
    locking/rtmutex: Use acquire/release semantics
    locking/mutex: Use acquire/release semantics
    locking/asm-generic: Add _{relaxed|acquire|release}() variants for inc/dec atomics
    atomic: Implement atomic_read_ctrl()
    atomic, arch: Audit atomic_{read,set}()
    atomic: Add atomic_long_t bitops
    futex: Force hot variables into a single cache line
    locking/pvqspinlock: Kick the PV CPU unconditionally when _Q_SLOW_VAL
    locking/osq: Relax atomic semantics
    locking/qrwlock: Rename ->lock to ->wait_lock
    locking/Documentation/lockstat: Fix typo - lokcing -> locking
    locking/atomics, cmpxchg: Privatize the inclusion of asm/cmpxchg.h

    Linus Torvalds
     

07 Oct, 2015

1 commit

  • Real time mutexes is one of the few general primitives
    that we do not have in locktorture. Address this -- a few
    considerations:

    o To spice things up, enable competing thread(s) to become
    rt, such that we can stress different prio boosting paths
    in the rtmutex code. Introduce a ->task_boost callback,
    only used by rtmutex-torturer. Tasks will boost/deboost
    around every 50k (arbitrarily) lock/unlock operations.

    o Hold times are similar to what we have for other locks:
    only occasionally having longer hold times (per ~200k ops).
    So we roughly do two full rt boost+deboosting ops with
    short hold times.

    Signed-off-by: Davidlohr Bueso
    Signed-off-by: Paul E. McKenney
    Reviewed-by: Josh Triplett

    Davidlohr Bueso
     

18 Sep, 2015

1 commit


12 Feb, 2015

1 commit

  • Pull documentation updates from Jonathan Corbet:
    "Highlights this time around include:

    - A thrashing of SubmittingPatches to bring it out of the "send
    everything to Linus" era of kernel development.

    - A new document on completions from Nicholas McGuire

    - Lots of typo fixes, formatting improvements, corrections, build
    fixes, and more"

    * tag 'docs-for-linus' of git://git.lwn.net/linux-2.6: (35 commits)
    Documentation: Fix the wrong command `echo -1 > set_ftrace_pid` for cleaning the filter.
    can-doc: Fixed a wrong filepath in can.txt
    Documentation: Fix trivial typo in comment.
    kgdb,docs: Fix typo and minor style issues
    Documentation: add description for FTRACE probe status
    doc: brief user documentation for completion
    Documentation/misc-devices/mei: Fix indentation of embedded code.
    Documentation/misc-devices/mei: Fix indentation of enumeration.
    Documentation/misc-devices/mei: Fix spacing around parentheses.
    Documentation/misc-devices/mei: Fix formatting of headings.
    Documentation: devicetree: Fix double words in Doumentation/devicetree
    Documentation: mm: Fix typo in vm.txt
    lockstat: Add documentation on contention and contenting points
    Documentation: fix blackfin gptimers-example build errors
    Fixes column alignment in table of contents entry 1.9 in Documentation/filesystems/proc.txt
    CodingStyle: enable emacs display of trailing whitespace
    DocBook: Do not exceed argument list limit
    gpio: board.txt: Fix the gpio name example
    Documentation/SubmittingPatches: unify whitespace/tabs for the DCO
    MAINTAINERS: Add the docs-next git tree to the maintainer entry
    ...

    Linus Torvalds
     

29 Jan, 2015

1 commit


16 Jan, 2015

1 commit

  • lockdep code has been moved from kernel/ to kernel/locking/ by commit
    8eddac3f103736163f49255bcb109edadea167f6 ("locking: Move the lockdep
    code to kernel/locking/"). But, path to lockdep code in document was not
    updated.

    This commit updates the path.

    Signed-off-by: SeongJae Park
    Signed-off-by: Peter Zijlstra (Intel)
    Link: http://lkml.kernel.org/r/1421176921-27688-1-git-send-email-sj38.park@gmail.com
    Cc: Jonathan Corbet
    Cc: Linus Torvalds
    Cc: linux-doc@vger.kernel.org
    Signed-off-by: Ingo Molnar

    SeongJae Park
     

30 Dec, 2014

1 commit

  • Added files
    - hsi.txt was added by 3a8ab8af (HSI: Add some general description for
    the HSI subsystem)
    - lzo.txt was added by d98a0526 (lzo: document part of the encoding)
    - xillybus.txt was added by 7051924f (xillybus: Move out of staging)
    - mailbox.txt was added by 15320fbc (add documentation for mailbox
    framework)

    Moved files
    - xommit 214e0aed (Move locking related docs into Documentation/locking/):
    * lockdep-design.txt
    * lockstat.txt
    * mutex-design.txt
    * rt-mutex-design.txt
    * rt-mutex.txt
    * spinlocks.txt
    * ww-mutex-design.txt
    - kselftest.txt was moved by 3c415707 (kselftest: Move the docs to the
    Documentation dir)

    CC: Davidlohr Bueso
    CC: Willy Tarreau
    CC: Randy Dunlap
    CC: Greg Kroah-Hartman
    CC: Sebastian Reichel
    CC: Eli Billauer
    CC: Jonathan Corbet
    CC: Jiri Kosina
    CC: linux-doc@vger.kernel.org
    CC: linux-kernel@vger.kernel.org
    Cc: Tim Bird
    Cc: Shuah Khan

    Signed-off-by: Henrik Austad
    Signed-off-by: Jonathan Corbet

    Henrik Austad
     

10 Dec, 2014

1 commit


08 Dec, 2014

1 commit

  • Local/global locks are currently not documented anywhere other
    than in an somewhat out-of-date LWN article - this is an attempt
    to document the current state of lglocks.

    This patch is against linux-next 3.18.0-rc6

    Signed-off-by: Nicholas Mc Guire
    Cc: Paul E. McKenney
    Cc: Carsten Emde
    Cc: Steven Rostedt
    Cc: Jonathan Corbet
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20141208083326.GA29895@opentech.at
    Signed-off-by: Ingo Molnar

    Nicholas Mc Guire
     

13 Oct, 2014

1 commit

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

    - mutex MCS refactoring finishing touches: improve comments, refactor
    and clean up code, reduce debug data structure footprint, etc.

    - qrwlock finishing touches: remove old code, self-test updates.

    - small rwsem optimization

    - various smaller fixes/cleanups"

    * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    locking/lockdep: Revert qrwlock recusive stuff
    locking/rwsem: Avoid double checking before try acquiring write lock
    locking/rwsem: Move EXPORT_SYMBOL() lines to follow function definition
    locking/rwlock, x86: Delete unused asm/rwlock.h and rwlock.S
    locking/rwlock, x86: Clean up asm/spinlock*.h to remove old rwlock code
    locking/semaphore: Resolve some shadow warnings
    locking/selftest: Support queued rwlock
    locking/lockdep: Restrict the use of recursive read_lock() with qrwlock
    locking/spinlocks: Always evaluate the second argument of spin_lock_nested()
    locking/Documentation: Update locking/mutex-design.txt disadvantages
    locking/Documentation: Move locking related docs into Documentation/locking/
    locking/mutexes: Use MUTEX_SPIN_ON_OWNER when appropriate
    locking/mutexes: Refactor optimistic spinning code
    locking/mcs: Remove obsolete comment
    locking/mutexes: Document quick lock release when unlocking
    locking/mutexes: Standardize arguments in lock/unlock slowpaths
    locking: Remove deprecated smp_mb__() barriers

    Linus Torvalds
     

30 Sep, 2014

1 commit

  • Add a "rw_lock" torture test to stress kernel rwlocks and their irq
    variant. Reader critical regions are 5x longer than writers. As such
    a similar ratio of lock acquisitions is seen in the statistics. In the
    case of massive contention, both hold the lock for 1/10 of a second.

    Signed-off-by: Davidlohr Bueso
    Signed-off-by: Paul E. McKenney

    Davidlohr Bueso
     

17 Sep, 2014

2 commits

  • We can easily do so with our new reader lock support. Just an arbitrary
    design default: readers have higher (5x) critical region latencies than
    writers: 50 ms and 10 ms, respectively.

    Signed-off-by: Davidlohr Bueso
    Signed-off-by: Paul E. McKenney

    Davidlohr Bueso
     
  • Most of it is based on what we already have for writers. This allows
    readers to be very independent (and thus configurable), enabling
    future module parameters to control things such as rw distribution.
    Furthermore, readers have their own delaying function, allowing us
    to test different rw critical region latencies, and stress locking
    internals. Similarly, statistics, for now will only serve for the
    number of lock acquisitions -- as opposed to writers, readers have
    no failure detection.

    In addition, introduce a new nreaders_stress module parameter. The
    default number of readers will be the same number of writers threads.
    Writer threads are interleaved with readers. Documentation is updated,
    respectively.

    Signed-off-by: Davidlohr Bueso
    Signed-off-by: Paul E. McKenney

    Davidlohr Bueso