From: "Paul E. McKenney" <paulmck@kernel.org>
To: "Joel Fernandes (Google)" <joel@joelfernandes.org>
Cc: linux-kernel@vger.kernel.org, Davidlohr Bueso <dave@stgolabs.net>,
Josh Triplett <josh@joshtriplett.org>,
Lai Jiangshan <jiangshanlai@gmail.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
rcu@vger.kernel.org, Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH 1/2] rcuperf: Remove useless while loops around wait_event
Date: Mon, 25 May 2020 11:04:14 -0700 [thread overview]
Message-ID: <20200525180414.GA2869@paulmck-ThinkPad-P72> (raw)
In-Reply-To: <20200525043648.152547-1-joel@joelfernandes.org>
On Mon, May 25, 2020 at 12:36:47AM -0400, Joel Fernandes (Google) wrote:
> wait_event() already retries if the condition for the wake up is not
> satisifed after wake up. Remove them from the rcuperf test.
>
> Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Queued the series, thank you, Joel!
Thanx, Paul
> ---
> kernel/rcu/rcuperf.c | 14 ++++----------
> 1 file changed, 4 insertions(+), 10 deletions(-)
>
> diff --git a/kernel/rcu/rcuperf.c b/kernel/rcu/rcuperf.c
> index 16dd1e6b7c09f..246da8fe199e8 100644
> --- a/kernel/rcu/rcuperf.c
> +++ b/kernel/rcu/rcuperf.c
> @@ -576,11 +576,8 @@ static int compute_real(int n)
> static int
> rcu_perf_shutdown(void *arg)
> {
> - do {
> - wait_event(shutdown_wq,
> - atomic_read(&n_rcu_perf_writer_finished) >=
> - nrealwriters);
> - } while (atomic_read(&n_rcu_perf_writer_finished) < nrealwriters);
> + wait_event(shutdown_wq,
> + atomic_read(&n_rcu_perf_writer_finished) >= nrealwriters);
> smp_mb(); /* Wake before output. */
> rcu_perf_cleanup();
> kernel_power_off();
> @@ -693,11 +690,8 @@ kfree_perf_cleanup(void)
> static int
> kfree_perf_shutdown(void *arg)
> {
> - do {
> - wait_event(shutdown_wq,
> - atomic_read(&n_kfree_perf_thread_ended) >=
> - kfree_nrealthreads);
> - } while (atomic_read(&n_kfree_perf_thread_ended) < kfree_nrealthreads);
> + wait_event(shutdown_wq,
> + atomic_read(&n_kfree_perf_thread_ended) >= kfree_nrealthreads);
>
> smp_mb(); /* Wake before output. */
>
> --
> 2.27.0.rc0.183.gde8f92d652-goog
>
prev parent reply other threads:[~2020-05-25 18:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-25 4:36 Joel Fernandes (Google)
2020-05-25 4:36 ` [PATCH 2/2] refperf: Add a test to measure performance of read-side synchronization Joel Fernandes (Google)
2020-05-25 18:04 ` Paul E. McKenney [this message]
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=20200525180414.GA2869@paulmck-ThinkPad-P72 \
--to=paulmck@kernel.org \
--cc=dave@stgolabs.net \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.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
all inboxes | Powered by JetHome®