Skip to content

Commit 7e86646

Browse files
joelagnelpaulmckrcu
authored andcommitted
rcuperf: Remove useless while loops around wait_event
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) <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 9ebcfad commit 7e86646

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

kernel/rcu/rcuperf.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -576,11 +576,8 @@ static int compute_real(int n)
576576
static int
577577
rcu_perf_shutdown(void *arg)
578578
{
579-
do {
580-
wait_event(shutdown_wq,
581-
atomic_read(&n_rcu_perf_writer_finished) >=
582-
nrealwriters);
583-
} while (atomic_read(&n_rcu_perf_writer_finished) < nrealwriters);
579+
wait_event(shutdown_wq,
580+
atomic_read(&n_rcu_perf_writer_finished) >= nrealwriters);
584581
smp_mb(); /* Wake before output. */
585582
rcu_perf_cleanup();
586583
kernel_power_off();
@@ -693,11 +690,8 @@ kfree_perf_cleanup(void)
693690
static int
694691
kfree_perf_shutdown(void *arg)
695692
{
696-
do {
697-
wait_event(shutdown_wq,
698-
atomic_read(&n_kfree_perf_thread_ended) >=
699-
kfree_nrealthreads);
700-
} while (atomic_read(&n_kfree_perf_thread_ended) < kfree_nrealthreads);
693+
wait_event(shutdown_wq,
694+
atomic_read(&n_kfree_perf_thread_ended) >= kfree_nrealthreads);
701695

702696
smp_mb(); /* Wake before output. */
703697

0 commit comments

Comments
 (0)