diff options
| author | Marcelo Tosatti <[email protected]> | 2022-05-30 12:51:56 -0300 |
|---|---|---|
| committer | akpm <[email protected]> | 2022-06-16 19:11:30 -0700 |
| commit | 31733463372e8d88ea54bfa1e35178aad9b2ffd2 (patch) | |
| tree | 68c4d69085bcd22c77badcafd1e3cb50e8a99411 | |
| parent | 042999388ef3dba43e813fdc6d6133ec9ca405dc (diff) | |
mm: lru_cache_disable: use synchronize_rcu_expedited
commit ff042f4a9b050 ("mm: lru_cache_disable: replace work queue
synchronization with synchronize_rcu") replaced lru_cache_disable's usage
of work queues with synchronize_rcu.
Some users reported large 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.
Link: https://lkml.kernel.org/r/YpToHCmnx/[email protected]
Fixes: ff042f4a9b050 ("mm: lru_cache_disable: replace work queue synchronization with synchronize_rcu")
Signed-off-by: Marcelo Tosatti <[email protected]>
Tested-by: Stefan Wahren <[email protected]>
Tested-by: Michael Larabel <[email protected]>
Cc: Sebastian Andrzej Siewior <[email protected]>
Cc: Nicolas Saenz Julienne <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Juri Lelli <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Paul E. McKenney <[email protected]>
Cc: Phil Elwell <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
| -rw-r--r-- | mm/swap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/swap.c b/mm/swap.c index f3922a96b2e9..034bb24879a3 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -881,7 +881,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 |