Wipefs partition4/3/2023 ![]() Rwsem_down_read_slowpath(struct rw_semaphore *sem, int state, long count) +++ -991,16 +991,27 rwsem_spin_on_owner(struct rw_semaphore *sem, unsigned long nonspinnable) Long cnt = atomic_long_add_return_acquire(RWSEM_READER_BIAS, &sem->count) +static inline long rwsem_read_trylock(struct rw_semaphore *sem) static inline bool rwsem_read_trylock(struct rw_semaphore *sem) +++ -270,12 +270,12 static inline void rwsem_set_nonspinnable(struct rw_semaphore *sem) ![]() Kernel/locking/rwsem.c | 20 ++++++++++++-ġ file changed, 12 insertions(+), 8 deletions(-)ĭiff -git a/kernel/locking/rwsem.c b/kernel/locking/rwsem.c Passed down to rwsem_down_read_slowpath() to be used when appropriate. To determine the rwsem state at trylock time. The atomic count value right after reader count increment can be useful ` (4 subsequent siblings) 5 siblings, 1 reply 21+ messages in thread 4:14 ` locking/rwsem: Prevent potential lock starvation Waiman Long 4:14 locking/rwsem: Rework reader optimistic spinning Waiman 4:14 ` Waiman Long * locking/rwsem: Pass the current atomic count to rwsem_down_read_slowpath() Locking/rwsem: Remove reader optimistic spinning Locking/rwsem: Wake up all waiting readers if RWSEM_WAKE_READ_OWNED Locking/rwsem: Enable reader optimistic lock stealing Locking/rwsem: Prevent potential lock starvation Locking/rwsem: Pass the current atomic count to To spin on a reader-owned rwsem for a limited time. This patch series adopts the second approach by dropping reader spinningįor now as it simplifies the code. Two differentġ) further reduce reader optimistic spinning Reduce performance in some heavily contented cases. Then there is the issue of reader fragmentation that can potentially Patchesģ and 4 are further optimizations of the current code. That patchĭoes reduce reader spinning to avoid this potential problem. Potential lock starvation scenario as explained in patch 2. Time due to rwsem reader optimistic spinning led me to reexamine theĬode to see the pro and cons of doing it. Patch 5: fix !CONFIG_RWSEM_SPIN_ON_OWNER compilation errors.Ī recent report of SAP certification failure caused by increased system Patch 4: correctly handle HANDOFF clearing. ![]() Patch 3: rename osq_is_empty() to rwsem_no_spinners() as suggested. Update some commit logs to incorporate review comments. To: Peter Zijlstra, Ingo Molnar, Will DeaconĬc: linux-kernel, Davidlohr Bueso, Phil Auld, Waiman Long ` (5 more replies) 0 siblings, 6 replies 21+ messages in thread 4:14 ` locking/rwsem: Pass the current atomic count to rwsem_down_read_slowpath() Waiman Long Locking/rwsem: Rework reader optimistic spinning All of help / color / mirror / Atom feed * locking/rwsem: Rework reader optimistic spinning 4:14 Waiman Long ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |