From: Frederic Weisbecker <frederic@kernel.org>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Scenario TREE07 with CONFIG_PREEMPT_DYNAMIC=n?
Date: Fri, 11 Mar 2022 18:26:20 +0100 [thread overview]
Message-ID: <20220311172620.GA229256@lothringen> (raw)
In-Reply-To: <20220311164758.GA3574399@paulmck-ThinkPad-P17-Gen-1>
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...).
next prev parent reply other threads:[~2022-03-11 17:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-10 21:56 Scenario TREE07 with CONFIG_PREEMPT_DYNAMIC=n? Paul E. McKenney
2022-03-10 22:41 ` Frederic Weisbecker
2022-03-10 22:52 ` Paul E. McKenney
2022-03-11 11:32 ` Frederic Weisbecker
2022-03-11 13:07 ` Frederic Weisbecker
2022-03-11 15:21 ` Paul E. McKenney
2022-03-11 15:46 ` Frederic Weisbecker
2022-03-11 16:06 ` Paul E. McKenney
2022-03-11 16:47 ` Paul E. McKenney
2022-03-11 17:26 ` Frederic Weisbecker [this message]
2022-03-11 17:33 ` Paul E. McKenney
2022-03-11 11:08 ` Frederic Weisbecker
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=20220311172620.GA229256@lothringen \
--to=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
/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