[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220627111949.383620931@linuxfoundation.org>
Date: Mon, 27 Jun 2022 13:22:15 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Marcelo Tosatti <mtosatti@...hat.com>,
Stefan Wahren <stefan.wahren@...e.com>,
Michael Larabel <Michael@...haelLarabel.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Nicolas Saenz Julienne <nsaenzju@...hat.com>,
Borislav Petkov <bp@...en8.de>,
Minchan Kim <minchan@...nel.org>,
Matthew Wilcox <willy@...radead.org>,
Mel Gorman <mgorman@...hsingularity.net>,
Juri Lelli <juri.lelli@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
"Paul E. McKenney" <paulmck@...nel.org>,
Phil Elwell <phil@...pberrypi.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH 5.18 162/181] mm: lru_cache_disable: use synchronize_rcu_expedited
From: Marcelo Tosatti <mtosatti@...hat.com>
commit 31733463372e8d88ea54bfa1e35178aad9b2ffd2 upstream.
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/HEcVyR@fuller.cnet
Fixes: ff042f4a9b050 ("mm: lru_cache_disable: replace work queue synchronization with synchronize_rcu")
Signed-off-by: Marcelo Tosatti <mtosatti@...hat.com>
Tested-by: Stefan Wahren <stefan.wahren@...e.com>
Tested-by: Michael Larabel <Michael@...haelLarabel.com>
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Nicolas Saenz Julienne <nsaenzju@...hat.com>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Minchan Kim <minchan@...nel.org>
Cc: Matthew Wilcox <willy@...radead.org>
Cc: Mel Gorman <mgorman@...hsingularity.net>
Cc: Juri Lelli <juri.lelli@...hat.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Paul E. McKenney <paulmck@...nel.org>
Cc: Phil Elwell <phil@...pberrypi.com>
Cc: <stable@...r.kernel.org>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
mm/swap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
--
2.36.1
Powered by blists - more mailing lists