<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/Documentation/locking, branch v5.8</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-06-01T22:45:27Z</updated>
<entry>
<title>Merge tag 'docs-5.8' of git://git.lwn.net/linux</title>
<updated>2020-06-01T22:45:27Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2020-06-01T22:45:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b23c4771ff62de8ca9b5e4a2d64491b2fb6f8f69'/>
<id>urn:sha1:b23c4771ff62de8ca9b5e4a2d64491b2fb6f8f69</id>
<content type='text'>
Pull documentation updates from Jonathan Corbet:
 "A fair amount of stuff this time around, dominated by yet another
  massive set from Mauro toward the completion of the RST conversion. I
  *really* hope we are getting close to the end of this. Meanwhile,
  those patches reach pretty far afield to update document references
  around the tree; there should be no actual code changes there. There
  will be, alas, more of the usual trivial merge conflicts.

  Beyond that we have more translations, improvements to the sphinx
  scripting, a number of additions to the sysctl documentation, and lots
  of fixes"

* tag 'docs-5.8' of git://git.lwn.net/linux: (130 commits)
  Documentation: fixes to the maintainer-entry-profile template
  zswap: docs/vm: Fix typo accept_threshold_percent in zswap.rst
  tracing: Fix events.rst section numbering
  docs: acpi: fix old http link and improve document format
  docs: filesystems: add info about efivars content
  Documentation: LSM: Correct the basic LSM description
  mailmap: change email for Ricardo Ribalda
  docs: sysctl/kernel: document unaligned controls
  Documentation: admin-guide: update bug-hunting.rst
  docs: sysctl/kernel: document ngroups_max
  nvdimm: fixes to maintainter-entry-profile
  Documentation/features: Correct RISC-V kprobes support entry
  Documentation/features: Refresh the arch support status files
  Revert "docs: sysctl/kernel: document ngroups_max"
  docs: move locking-specific documents to locking/
  docs: move digsig docs to the security book
  docs: move the kref doc into the core-api book
  docs: add IRQ documentation at the core-api book
  docs: debugging-via-ohci1394.txt: add it to the core-api book
  docs: fix references for ipmi.rst file
  ...
</content>
</entry>
<entry>
<title>locking: Introduce local_lock()</title>
<updated>2020-05-28T08:31:09Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2020-05-27T20:11:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=91710728d1725de51d06b40674abf6e860d592c7'/>
<id>urn:sha1:91710728d1725de51d06b40674abf6e860d592c7</id>
<content type='text'>
preempt_disable() and local_irq_disable/save() are in principle per CPU big
kernel locks. This has several downsides:

  - The protection scope is unknown

  - Violation of protection rules is hard to detect by instrumentation

  - For PREEMPT_RT such sections, unless in low level critical code, can
    violate the preemptability constraints.

To address this PREEMPT_RT introduced the concept of local_locks which are
strictly per CPU.

The lock operations map to preempt_disable(), local_irq_disable/save() and
the enabling counterparts on non RT enabled kernels.

If lockdep is enabled local locks gain a lock map which tracks the usage
context. This will catch cases where an area is protected by
preempt_disable() but the access also happens from interrupt context. local
locks have identified quite a few such issues over the years, the most
recent example is:

  b7d5dc21072cd ("random: add a spinlock_t to struct batched_entropy")

Aside of the lockdep coverage this also improves code readability as it
precisely annotates the protection scope.

PREEMPT_RT substitutes these local locks with 'sleeping' spinlocks to
protect such sections while maintaining preemtability and CPU locality.

local locks can replace:

  - preempt_enable()/disable() pairs
  - local_irq_disable/enable() pairs
  - local_irq_save/restore() pairs

They are also used to replace code which implicitly disables preemption
like:

  - get_cpu()/put_cpu()
  - get_cpu_var()/put_cpu_var()

with PREEMPT_RT friendly constructs.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Acked-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/20200527201119.1692513-2-bigeasy@linutronix.de
</content>
</entry>
<entry>
<title>docs: move locking-specific documents to locking/</title>
<updated>2020-05-15T18:05:07Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2020-05-01T15:37:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=95ca6d73a8a97ba343082746dbf935863b76375a'/>
<id>urn:sha1:95ca6d73a8a97ba343082746dbf935863b76375a</id>
<content type='text'>
Several files under Documentation/*.txt describe some type of
locking API. Move them to locking/ subdir and add to the
locking/index.rst index file.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Link: https://lore.kernel.org/r/dd833a10bbd0b2c1461d78913f5ec28a7e27f00b.1588345503.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>doc:locking: remove info about old behavior of locktorture</title>
<updated>2020-05-05T15:55:58Z</updated>
<author>
<name>Federico Vaga</name>
<email>federico.vaga@vaga.pv.it</email>
</author>
<published>2020-04-26T21:14:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=649f9cf5f5964a9b26d8407289c356624652162a'/>
<id>urn:sha1:649f9cf5f5964a9b26d8407289c356624652162a</id>
<content type='text'>
It is not useful to know what was the default at some point in the
past: remove the information.

Signed-off-by: Federico Vaga &lt;federico.vaga@vaga.pv.it&gt;
Link: https://lore.kernel.org/r/20200426211429.29133-1-federico.vaga@vaga.pv.it
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>Documentation/locking/locktypes: Minor copy editor fixes</title>
<updated>2020-03-28T11:47:34Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2020-03-25T16:58:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=51e69e6551a8c6fffe0185ba305bb4e2d7223616'/>
<id>urn:sha1:51e69e6551a8c6fffe0185ba305bb4e2d7223616</id>
<content type='text'>
Minor editorial fixes:
- remove 'enabled' from PREEMPT_RT enabled kernels for consistency
- add some periods for consistency
- add "'" for possessive CPU's
- spell out interrupts

[ tglx: Picked up Paul's suggestions ]

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
Link: https://lkml.kernel.org/r/ac615f36-0b44-408d-aeab-d76e4241add4@infradead.org

</content>
</entry>
<entry>
<title>Documentation/locking/locktypes: Further clarifications and wordsmithing</title>
<updated>2020-03-28T11:47:34Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2020-03-25T12:27:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7ecc6aa522e1b812a2eacc31066945e920b0fde4'/>
<id>urn:sha1:7ecc6aa522e1b812a2eacc31066945e920b0fde4</id>
<content type='text'>
The documentation of rw_semaphores is wrong as it claims that the non-owner
reader release is not supported by RT. That's just history biased memory
distortion.

Split the 'Owner semantics' section up and add separate sections for
semaphore and rw_semaphore to reflect reality.

Aside of that the following updates are done:

 - Add pseudo code to document the spinlock state preserving mechanism on
   PREEMPT_RT

 - Wordsmith the bitspinlock and lock nesting sections

Co-developed-by: Paul McKenney &lt;paulmck@kernel.org&gt;
Signed-off-by: Paul McKenney &lt;paulmck@kernel.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Link: https://lkml.kernel.org/r/87wo78y5yy.fsf@nanos.tec.linutronix.de

</content>
</entry>
<entry>
<title>Documentation: Add lock ordering and nesting documentation</title>
<updated>2020-03-21T15:00:23Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2020-03-21T11:25:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=919e9e6395cfac23b7e71ed88930367459055daf'/>
<id>urn:sha1:919e9e6395cfac23b7e71ed88930367459055daf</id>
<content type='text'>
The kernel provides a variety of locking primitives. The nesting of these
lock types and the implications of them on RT enabled kernels is nowhere
documented.

Add initial documentation.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://lkml.kernel.org/r/20200321113242.026561244@linutronix.de
</content>
</entry>
<entry>
<title>docs/locking: Fix outdated section names</title>
<updated>2020-02-05T17:21:12Z</updated>
<author>
<name>SeongJae Park</name>
<email>sjpark@amazon.com</email>
</author>
<published>2020-01-31T20:52:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4bfdebd6202da4cbf723c53f475999b7537d4e48'/>
<id>urn:sha1:4bfdebd6202da4cbf723c53f475999b7537d4e48</id>
<content type='text'>
Commit 2e4f5382d12a ("locking/doc: Rename LOCK/UNLOCK to
ACQUIRE/RELEASE") has not appied to 'spinlock.rst'.  This commit updates
the doc for the change.

Signed-off-by: SeongJae Park &lt;sjpark@amazon.com&gt;
Link: https://lore.kernel.org/r/20200131205237.29535-2-sj38.park@gmail.com
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>doc:locking: fix locktorture parameter description</title>
<updated>2019-12-19T18:04:29Z</updated>
<author>
<name>Federico Vaga</name>
<email>federico.vaga@vaga.pv.it</email>
</author>
<published>2019-12-01T12:19:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3dbbeef42b6489ec7c10dba4d2b7805c9bbff773'/>
<id>urn:sha1:3dbbeef42b6489ec7c10dba4d2b7805c9bbff773</id>
<content type='text'>
The description was talking about two default values: I removed the
wrong one.

Signed-off-by: Federico Vaga &lt;federico.vaga@vaga.pv.it&gt;
Link: https://lore.kernel.org/r/20191201121941.6971-1-federico.vaga@vaga.pv.it
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>doc:lock: remove reference to clever use of read-write lock</title>
<updated>2019-09-14T07:53:27Z</updated>
<author>
<name>Federico Vaga</name>
<email>federico.vaga@vaga.pv.it</email>
</author>
<published>2019-09-08T06:29:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=19ad5f79f92e01375070009439c9f3ae22dc6b22'/>
<id>urn:sha1:19ad5f79f92e01375070009439c9f3ae22dc6b22</id>
<content type='text'>
Remove the clever example about read-write lock because this type of
lock is not recommended anymore (according to the very same document).
So there is no reason to teach clever things that people should not do.

Signed-off-by: Federico Vaga &lt;federico.vaga@vaga.pv.it&gt;
Acked-by: Will Deacon &lt;will@kernel.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
</feed>
