From: Waiman Long <longman@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
Boqun Feng <boqun.feng@gmail.com>
Cc: linux-kernel@vger.kernel.org, Waiman Long <longman@redhat.com>
Subject: [PATCH v2 0/8] locking/rwsem: Rework writer wakeup and handoff
Date: Mon, 27 Mar 2023 16:24:05 -0400 [thread overview]
Message-ID: <20230327202413.1955856-1-longman@redhat.com> (raw)
This is a followup to the patches in queue.git locking/core branch
posted by Peter in [1]. His patch series unified the reader and writer
paths as much as possible and making the code a bit easier to maintain.
Unfortunately, it did regress performance because it suppress writer
lock stealing via optimistic spinning [2].
This series include the 7 patches in his locking/core branch with a minor
change to the last one to remove the now unneeded rwsem_wlock_ehandoff
event. The last patch in the series restores the old write lock slow
path behavior of acquiring the write lock mostly in the slow path which
is necessary to restore the performance level back to parity.
[1] https://lore.kernel.org/lkml/Y%2FuN+89FlTw45uiA@hirez.programming.kicks-ass.net/
[2] https://lore.kernel.org/lkml/c126f079-88a2-4067-6f94-82f51cf5ff2b@redhat.com/
Peter Zijlstra (6):
locking/rwsem: Enforce queueing when HANDOFF
locking/rwsem: Rework writer wakeup
locking/rwsem: Simplify rwsem_writer_wake()
locking/rwsem: Split out rwsem_reader_wake()
locking/rwsem: Unify wait loop
locking/rwsem: Use the force
Waiman Long (2):
locking/rwsem: Minor code refactoring in rwsem_mark_wake()
locking/rwsem: Restore old write lock slow path behavior
kernel/locking/rwsem.c | 466 ++++++++++++++++++++++-------------------
1 file changed, 246 insertions(+), 220 deletions(-)
--
2.31.1
next reply other threads:[~2023-03-27 20:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-27 20:24 Waiman Long [this message]
2023-03-27 20:24 ` [PATCH v2 1/8] locking/rwsem: Minor code refactoring in rwsem_mark_wake() Waiman Long
2023-03-27 20:24 ` [PATCH v2 2/8] locking/rwsem: Enforce queueing when HANDOFF Waiman Long
2023-03-27 20:24 ` [PATCH v2 3/8] locking/rwsem: Rework writer wakeup Waiman Long
2023-03-27 20:24 ` [PATCH v2 4/8] locking/rwsem: Simplify rwsem_writer_wake() Waiman Long
2023-03-27 20:24 ` [PATCH v2 5/8] locking/rwsem: Split out rwsem_reader_wake() Waiman Long
2023-03-27 20:24 ` [PATCH v2 6/8] locking/rwsem: Unify wait loop Waiman Long
2023-03-27 20:24 ` [PATCH v2 7/8] locking/rwsem: Use the force Waiman Long
2023-03-27 20:24 ` [PATCH v2 8/8] locking/rwsem: Restore old write lock slow path behavior Waiman Long
2023-03-28 14:02 ` Peter Zijlstra
2023-03-29 3:45 ` Waiman Long
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230327202413.1955856-1-longman@redhat.com \
--to=longman@redhat.com \
--cc=boqun.feng@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox