[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220311173320.GK4285@paulmck-ThinkPad-P17-Gen-1>
Date: Fri, 11 Mar 2022 09:33:20 -0800
From: "Paul E. McKenney" <paulmck@...nel.org>
To: Frederic Weisbecker <frederic@...nel.org>
Cc: linux-kernel@...r.kernel.org
Subject: Re: Scenario TREE07 with CONFIG_PREEMPT_DYNAMIC=n?
On Fri, Mar 11, 2022 at 06:26:20PM +0100, Frederic Weisbecker wrote:
> On Fri, Mar 11, 2022 at 08:47:58AM -0800, Paul E. McKenney wrote:
> > And there is one more issue with this code. Someone invoking
> > get_state_synchronize_rcu_expedited() in one task might naively expect
> > that calls to synchronize_rcu_expedited() in some other task would cause
> > a later poll_state_synchronize_rcu_expedited() would return true.
> >
> > Except that if CONFIG_PREEMPT_NONE=y and there is only one CPU, those
> > calls to synchronize_rcu_expedited() won't be helping at all.
> >
> > I could imagine poll_state_synchronize_rcu_expedited() setting a
> > global flag if there is only one CPU, which could be checked by
> > __synchronize_rcu_expedited() and reset.
> >
> > Is there a better way?
>
> I would tend to think that in this case, it's the responsibility of the
> caller to make sure that the task supposed to start the exp GP has a chance
> to run (cond_resched(), etc...).
Hahahahahahaha!
The same problem arises for poll_state_synchronize_rcu() and friends
on a single-CPU CONFIG_PREEMPT_NONE=y system.
Thanx, Paul
Powered by blists - more mailing lists