Skip to content

Commit

Permalink
rcu: fix a performance regression
Browse files Browse the repository at this point in the history
Commit "rcu: Create RCU-specific workqueues with rescuers" switched RCU
to using local workqueses and removed power efficiency flag from them.

This caused a performance regression that can be observed in Geekbench 5
after enabling CONFIG_WQ_POWER_EFFICIENT_DEFAULT: score went down from
760/2500 to 620/2300 (single/multi core respectively).

Add WQ_POWER_EFFICIENT flag to avoid this regression.

Change-Id: If4975db6c4b8e2e442c6bb0d11900260f424c1ea
Signed-off-by: Yaroslav Furman <[email protected]>
Signed-off-by: alk3pInjection <[email protected]>
Signed-off-by: LibXZR <[email protected]>
  • Loading branch information
YaroST12 authored and HELLINFIX committed Apr 15, 2024
1 parent 9eac798 commit 171d4ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/rcu/tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -4179,9 +4179,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);
rcu_gp_wq = alloc_workqueue("rcu_gp", WQ_POWER_EFFICIENT | WQ_MEM_RECLAIM, 0);
WARN_ON(!rcu_gp_wq);
rcu_par_gp_wq = alloc_workqueue("rcu_par_gp", WQ_MEM_RECLAIM, 0);
rcu_par_gp_wq = alloc_workqueue("rcu_par_gp", WQ_POWER_EFFICIENT | WQ_MEM_RECLAIM, 0);
WARN_ON(!rcu_par_gp_wq);
}

Expand Down

0 comments on commit 171d4ce

Please sign in to comment.