* [PATCH] mm: lru_cache_disable: use synchronize_rcu_expedited
@ 2022-05-30 15:51 Marcelo Tosatti
0 siblings, 0 replies; only message in thread
From: Marcelo Tosatti @ 2022-05-30 15:51 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Stefan Wahren, Michael Larabel, Paul E. McKenney
commit ff042f4a9b050895a42cae893cc01fa2ca81b95c replaced
lru_cache_disable's usage of work queues with synchronize_rcu.
Some users reported performance regressions due to this commit, for example:
https://lore.kernel.org/all/20220521234616.GO1790663@paulmck-ThinkPad-P17-Gen-1/T/
Switching to synchronize_rcu_expedited fixes the problem.
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Tested-by: Michael Larabel <Michael@MichaelLarabel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
diff --git a/mm/swap.c b/mm/swap.c
index bceff0cb559c..04a8bbf9817a 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -879,7 +879,7 @@ void lru_cache_disable(void)
* lru_disable_count = 0 will have exited the critical
* section when synchronize_rcu() returns.
*/
- synchronize_rcu();
+ synchronize_rcu_expedited();
#ifdef CONFIG_SMP
__lru_add_drain_all(true);
#else
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-30 17:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-30 15:51 [PATCH] mm: lru_cache_disable: use synchronize_rcu_expedited Marcelo Tosatti
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.