lkml.org 
[lkml]   [2021]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 2/2] locking/rwbase_rt: Lockless reader waking up a writer
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 */
\
 
 \ /
  Last update: 2021-09-02 01:04    [W:0.116 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site