lkml.org 
[lkml]   [2022]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v2 5/8] rcu/nocb: Wake up gp thread when flushing
On Wed, Jun 22, 2022 at 10:50:59PM +0000, Joel Fernandes (Google) wrote:
> We notice that rcu_barrier() can take a really long time. It appears
> that this can happen when all CBs are lazy and the timer does not fire
> yet. So after flushing, nothing wakes up GP thread. This patch forces
> GP thread to wake when bypass flushing happens, this fixes the
> rcu_barrier() delays with lazy CBs.

I am wondering if there is a bug in non-rcu_barrier() lazy callback
processing hiding here as well?

Thanx, Paul

> Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
> ---
> kernel/rcu/tree_nocb.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/kernel/rcu/tree_nocb.h b/kernel/rcu/tree_nocb.h
> index 2f5da12811a5..b481f1ea57c0 100644
> --- a/kernel/rcu/tree_nocb.h
> +++ b/kernel/rcu/tree_nocb.h
> @@ -325,6 +325,8 @@ static bool rcu_nocb_do_flush_bypass(struct rcu_data *rdp, struct rcu_head *rhp,
> rcu_segcblist_insert_pend_cbs(&rdp->cblist, &rcl);
> WRITE_ONCE(rdp->nocb_bypass_first, j);
> rcu_nocb_bypass_unlock(rdp);
> +
> + wake_nocb_gp(rdp, true);
> return true;
> }
>
> --
> 2.37.0.rc0.104.g0611611a94-goog
>

\
 
 \ /
  Last update: 2022-06-26 06:07    [W:0.687 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site