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.
Unified · Split
| @@ -881,7 +881,7 @@ void lru_cache_disable(void) · 880 unmodified lines | |||
| 881 | * lru_disable_count = 0 will have exited the critical | 881 | * lru_disable_count = 0 will have exited the critical |
| 882 | * section when synchronize_rcu() returns. | 882 | * section when synchronize_rcu() returns. |
| 883 | */ | 883 | */ |
| 884 | synchronize_rcu(); | 884 | synchronize_rcu_expedited(); |
| 885 | #ifdef CONFIG_SMP | 885 | #ifdef CONFIG_SMP |
| 886 | __lru_add_drain_all(true); | 886 | __lru_add_drain_all(true); |
| 887 | #else | 887 | #else |