rcuscale: Move shutdown from wait_event() to wait_event_idle()
[ Upstream commit ef1ef3d47677dc191b88650a9f7f91413452cc1b ] The rcu_scale_shutdown() and kfree_scale_shutdown() kthreads/functions use wait_event() to wait for the rcuscale test to complete. However, each updater thread in such a test waits for at least 100 grace periods. If each grace period takes more than 1.2 seconds, which is long, but not insanely so, this can trigger the hung-task timeout. This commit therefore replaces those wait_event() calls with calls to wait_event_idle(), which do not trigger the hung-task timeout. Reported-by: kernel test robot <yujie.liu@intel.com> Reported-by: Liam Howlett <liam.howlett@oracle.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Tested-by: Yujie Liu <yujie.liu@intel.com> Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Stable-dep-of: 23fc8df26dea ("rcu/rcuscale: Stop kfree_scale_thread thread(s) after unloading rcuscale") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a0a1f1c924
commit
7a34922194
@ -630,8 +630,7 @@ static int compute_real(int n)
|
|||||||
static int
|
static int
|
||||||
rcu_scale_shutdown(void *arg)
|
rcu_scale_shutdown(void *arg)
|
||||||
{
|
{
|
||||||
wait_event(shutdown_wq,
|
wait_event_idle(shutdown_wq, atomic_read(&n_rcu_scale_writer_finished) >= nrealwriters);
|
||||||
atomic_read(&n_rcu_scale_writer_finished) >= nrealwriters);
|
|
||||||
smp_mb(); /* Wake before output. */
|
smp_mb(); /* Wake before output. */
|
||||||
rcu_scale_cleanup();
|
rcu_scale_cleanup();
|
||||||
kernel_power_off();
|
kernel_power_off();
|
||||||
@ -757,8 +756,8 @@ kfree_scale_cleanup(void)
|
|||||||
static int
|
static int
|
||||||
kfree_scale_shutdown(void *arg)
|
kfree_scale_shutdown(void *arg)
|
||||||
{
|
{
|
||||||
wait_event(shutdown_wq,
|
wait_event_idle(shutdown_wq,
|
||||||
atomic_read(&n_kfree_scale_thread_ended) >= kfree_nrealthreads);
|
atomic_read(&n_kfree_scale_thread_ended) >= kfree_nrealthreads);
|
||||||
|
|
||||||
smp_mb(); /* Wake before output. */
|
smp_mb(); /* Wake before output. */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user