From: Davidlohr Bueso <dave@stgolabs.net>
To: tglx@linutronix.de
Cc: peterz@infradead.org, mingo@kernel.org, rostedt@goodmis.org,
longman@redhat.com, bigeasy@linutronix.de, boqun.feng@gmail.com,
linux-kernel@vger.kernel.org, Davidlohr Bueso <dbueso@suse.de>
Subject: Re: [PATCH 2/2] locking/rwbase_rt: Lockless reader waking up a writer
Date: Wed, 1 Sep 2021 16:03:20 -0700 [thread overview]
Message-ID: <20210901230320.3pogmlyzfgwpvw77@offworld> (raw)
In-Reply-To: <20210901222825.6313-3-dave@stgolabs.net>
On Wed, 01 Sep 2021, Bueso wrote:
>As with the rest of our sleeping locks, use a wake_q to
>allow waking up the writer without having to hold the
>wait_lock across the operation. While this is ideally
>for batching wakeups, single wakeup usage as still shown
>to be beneficial vs the cost of try_to_wakeup when the
>lock is contended.
>
>Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
>---
> kernel/locking/rwbase_rt.c | 4 +++-
> kernel/sched/core.c | 16 +++++++++++++---
Bleh, this of course is missing:
diff --git a/include/linux/sched/wake_q.h b/include/linux/sched/wake_q.h
index 06cd8fb2f409..695efd987b56 100644
--- a/include/linux/sched/wake_q.h
+++ b/include/linux/sched/wake_q.h
@@ -62,5 +62,6 @@ static inline bool wake_q_empty(struct wake_q_head *head)
extern void wake_q_add(struct wake_q_head *head, struct task_struct *task);
extern void wake_q_add_safe(struct wake_q_head *head, struct task_struct *task);
extern void wake_up_q(struct wake_q_head *head);
+extern void wake_up_q_state(struct wake_q_head *head, unsigned int state);
#endif /* _LINUX_SCHED_WAKE_Q_H */
next prev parent reply other threads:[~2021-09-01 23:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-01 22:28 [PATCH 0/2] locking/rwbase_rt: Use wake_q for lockless reader waker Davidlohr Bueso
2021-09-01 22:28 ` [PATCH 1/2] sched: Move wake_q code below try_to_wake_up() Davidlohr Bueso
2021-09-01 22:28 ` [PATCH 2/2] locking/rwbase_rt: Lockless reader waking up a writer Davidlohr Bueso
2021-09-01 23:03 ` Davidlohr Bueso [this message]
2021-09-03 10:55 ` Sebastian Andrzej Siewior
2021-09-13 12:20 ` Thomas Gleixner
2021-09-14 10:42 ` Thomas Gleixner
2021-09-16 17:02 ` Sebastian Andrzej Siewior
2021-09-16 17:27 ` Davidlohr Bueso
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=20210901230320.3pogmlyzfgwpvw77@offworld \
--to=dave@stgolabs.net \
--cc=bigeasy@linutronix.de \
--cc=boqun.feng@gmail.com \
--cc=dbueso@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).