linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/5] [PATCH v3 0/4] locking/rwsem: Add reader-owned state to the owner field
@ 2016-05-18  1:26 Waiman Long
  2016-05-18  1:26 ` [PATCH v4 1/5] " Waiman Long
                   ` (5 more replies)
  0 siblings, 6 replies; 31+ messages in thread
From: Waiman Long @ 2016-05-18  1:26 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar
  Cc: linux-kernel, Davidlohr Bueso, Jason Low, Dave Chinner,
	Peter Hurley, Paul E. McKenney, Scott J Norton, Douglas Hatch,
	Waiman Long

 v3->v4:
  - Add a new patch 2 to use WRITE_ONCE() for all rwsem->owner stores
    to prevent store tearing.

 v2->v3:
  - Make minor code changes as suggested by PeterZ & Peter Hurley.
  - Add 2 minor patches (#2 & #3) to improve the rwsem code
  - Add a 4th patch to streamline the rwsem_optimistic_spin() code.

 v1->v2:
  - Add rwsem_is_reader_owned() helper & rename rwsem_reader_owned()
    to rwsem_set_reader_owned().
  - Add more comments to clarify the purpose of some of the code
    changes.

Patch 1 is the main patch of this series.

Patch 2 protects against store tearing of rwsem->owner field which 
can cause problem when a reader tries to dereference it.

Patch 3 eliminates redundant wakeup caused by a reader waking itself.

Patch 4 improves the efficiency of the reader wakeup code.

Patch 5 streamlines the rwsem_optimistic_spin() to make it simpler.

Waiman Long (5):
  locking/rwsem: Add reader-owned state to the owner field
  locking/rwsem: Protect all writes to owner by WRITE_ONCE()
  locking/rwsem: Don't wake up one's own task
  locking/rwsem: Improve reader wakeup code
  locking/rwsem: Streamline the rwsem_optimistic_spin() code

 kernel/locking/rwsem-xadd.c |   75 ++++++++++++++++++++++++------------------
 kernel/locking/rwsem.c      |    8 +++-
 kernel/locking/rwsem.h      |   52 ++++++++++++++++++++++++++++-
 3 files changed, 99 insertions(+), 36 deletions(-)

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2016-06-08 14:27 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-18  1:26 [PATCH v4 0/5] [PATCH v3 0/4] locking/rwsem: Add reader-owned state to the owner field Waiman Long
2016-05-18  1:26 ` [PATCH v4 1/5] " Waiman Long
2016-06-06 17:18   ` Davidlohr Bueso
2016-06-06 20:03     ` Waiman Long
2016-06-06 21:02     ` Peter Zijlstra
2016-06-06 21:49       ` Waiman Long
2016-06-08 14:25   ` [tip:locking/core] " tip-bot for Waiman Long
2016-05-18  1:26 ` [PATCH v4 2/5] locking/rwsem: Protect all writes to owner by WRITE_ONCE() Waiman Long
2016-05-18 14:04   ` Davidlohr Bueso
2016-05-18 17:21     ` [PATCH v4 2/5] locking/rwsem: Protect all writes to owner by WRITE_ONCE Jason Low
2016-05-18 18:29       ` Waiman Long
2016-05-18 19:58         ` Jason Low
2016-05-19 22:21           ` Jason Low
2016-05-20 20:26             ` Waiman Long
2016-05-21 16:04           ` Peter Hurley
2016-05-22 10:42             ` Peter Zijlstra
2016-05-23 18:46             ` Jason Low
2016-05-23 19:44               ` Davidlohr Bueso
2016-05-23 20:15                 ` Paul E. McKenney
2016-05-23 21:04                   ` Davidlohr Bueso
2016-05-25  1:25               ` Waiman Long
2016-05-18 17:23     ` [PATCH v4 2/5] locking/rwsem: Protect all writes to owner by WRITE_ONCE() Jason Low
2016-06-08 14:25   ` [tip:locking/core] " tip-bot for Waiman Long
2016-05-18  1:26 ` [PATCH v4 3/5] locking/rwsem: Don't wake up one's own task Waiman Long
2016-05-18 10:30   ` Peter Zijlstra
2016-05-18 16:04     ` Waiman Long
2016-05-18  1:26 ` [PATCH v4 4/5] locking/rwsem: Improve reader wakeup code Waiman Long
2016-06-08 14:25   ` [tip:locking/core] " tip-bot for Waiman Long
2016-05-18  1:26 ` [PATCH v4 5/5] locking/rwsem: Streamline the rwsem_optimistic_spin() code Waiman Long
2016-06-08 14:26   ` [tip:locking/core] " tip-bot for Waiman Long
2016-05-18 10:52 ` [PATCH v4 0/5] [PATCH v3 0/4] locking/rwsem: Add reader-owned state to the owner field Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).