Skip to content

Commit

Permalink
rcu/nocb: Wake up gp thread when flushing
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
  • Loading branch information
joelagnel authored and intel-lab-lkp committed Jun 22, 2022
1 parent 69335ba commit b23d0c5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/rcu/tree_nocb.h
Expand Up @@ -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;
}

Expand Down

0 comments on commit b23d0c5

Please sign in to comment.