From 27bb889ce37d4ee7d12b91043ea546e65f38c1d5 Mon Sep 17 00:00:00 2001 From: Sultan Alsawaf Date: Sat, 28 Jan 2023 13:16:29 +0530 Subject: [PATCH] rcu: Make the grace period workers unbound again After a dedicated grace-period workqueue was added to RCU in order to benefit from rescuer threads, the relevant workers were moved to the new workqueue away from system_power_efficient_wq. The old workqueue was unbound, which is desirable for performance reasons. Making the workers bound measurably regressed performance, so make them unbound again. Signed-off-by: Sultan Alsawaf Signed-off-by: Panchajanya1999 (cherry picked from commit 139be6da6ee92c8b0aa2d19081fa230435082054) (cherry picked from commit 3428cd70087fe5fd538d96e89f8f12266aacc2d1) (cherry picked from commit b4e1beb3e73ccd6f341f95020becfff0b7139745) (cherry picked from commit 428f05ee3318ed4314317bb697abec26a4bcc930) --- kernel/rcu/tree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index b6403564c..60a395f96 100755 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -4607,9 +4607,9 @@ void __init rcu_init(void) } /* Create workqueue for expedited GPs and for Tree SRCU. */ - rcu_gp_wq = alloc_workqueue("rcu_gp", WQ_MEM_RECLAIM, 0); - WARN_ON(!rcu_gp_wq); - rcu_par_gp_wq = alloc_workqueue("rcu_par_gp", WQ_MEM_RECLAIM, 0); + rcu_gp_wq = alloc_workqueue("rcu_gp", WQ_POWER_EFFICIENT | WQ_MEM_RECLAIM | WQ_UNBOUND, 0); + WARN_ON(!rcu_gp_wq); + rcu_par_gp_wq = alloc_workqueue("rcu_par_gp", WQ_POWER_EFFICIENT | WQ_MEM_RECLAIM | WQ_UNBOUND, 0); WARN_ON(!rcu_par_gp_wq); srcu_init();