]> git.baikalelectronics.ru Git - kernel.git/commit
Merge tag 'locking-urgent-2021-11-28' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 28 Nov 2021 17:04:41 +0000 (09:04 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 28 Nov 2021 17:04:41 +0000 (09:04 -0800)
commit3af7691f3d513e7e992d26777e57e949c6d8d86f
treecea1890c9070f4edd6ac3e8811ba4cdb1499e410
parentdd233b42d5d72e0d3e99ec14cceb2a634eac5236
parent58cc4d021f4158aa9207c40f8eacaff2e6631086
Merge tag 'locking-urgent-2021-11-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull locking fixes from Thomas Gleixner:
 "Two regression fixes for reader writer semaphores:

   - Plug a race in the lock handoff which is caused by inconsistency of
     the reader and writer path and can lead to corruption of the
     underlying counter.

   - down_read_trylock() is suboptimal when the lock is contended and
     multiple readers trylock concurrently. That's due to the initial
     value being read non-atomically which results in at least two
     compare exchange loops. Making the initial readout atomic reduces
     this significantly. Whith 40 readers by 11% in a benchmark which
     enforces contention on mmap_sem"

* tag 'locking-urgent-2021-11-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  locking/rwsem: Optimize down_read_trylock() under highly contended case
  locking/rwsem: Make handoff bit handling more consistent