]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.11-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Oct 2024 09:47:39 +0000 (11:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Oct 2024 09:47:39 +0000 (11:47 +0200)
added patches:
mm-vmscan.c-fix-oom-on-swap-stress-test.patch

queue-6.11/mm-vmscan.c-fix-oom-on-swap-stress-test.patch [new file with mode: 0644]
queue-6.11/series

diff --git a/queue-6.11/mm-vmscan.c-fix-oom-on-swap-stress-test.patch b/queue-6.11/mm-vmscan.c-fix-oom-on-swap-stress-test.patch
new file mode 100644 (file)
index 0000000..4798e23
--- /dev/null
@@ -0,0 +1,45 @@
+From 0885ef4705607936fc36a38fd74356e1c465b023 Mon Sep 17 00:00:00 2001
+From: Chris Li <chrisl@kernel.org>
+Date: Thu, 5 Sep 2024 01:08:17 -0700
+Subject: mm: vmscan.c: fix OOM on swap stress test
+
+From: Chris Li <chrisl@kernel.org>
+
+commit 0885ef4705607936fc36a38fd74356e1c465b023 upstream.
+
+I found a regression on mm-unstable during my swap stress test, using
+tmpfs to compile linux.  The test OOM very soon after the make spawns many
+cc processes.
+
+It bisects down to this change: 33dfe9204f29b415bbc0abb1a50642d1ba94f5e9
+(mm/gup: clear the LRU flag of a page before adding to LRU batch)
+
+Yu Zhao propose the fix: "I think this is one of the potential side
+effects -- Huge mentioned earlier about isolate_lru_folios():"
+
+I test that with it the swap stress test no longer OOM.
+
+Link: https://lore.kernel.org/r/CAOUHufYi9h0kz5uW3LHHS3ZrVwEq-kKp8S6N-MZUmErNAXoXmw@mail.gmail.com/
+Link: https://lkml.kernel.org/r/20240905-lru-flag-v2-1-8a2d9046c594@kernel.org
+Fixes: 33dfe9204f29 ("mm/gup: clear the LRU flag of a page before adding to LRU batch")
+Signed-off-by: Chris Li <chrisl@kernel.org>
+Suggested-by: Yu Zhao <yuzhao@google.com>
+Suggested-by: Hugh Dickins <hughd@google.com>
+Closes: https://lore.kernel.org/all/CAF8kJuNP5iTj2p07QgHSGOJsiUfYpJ2f4R1Q5-3BN9JiD9W_KA@mail.gmail.com/
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ mm/vmscan.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/mm/vmscan.c
++++ b/mm/vmscan.c
+@@ -4300,7 +4300,7 @@ static bool sort_folio(struct lruvec *lr
+       }
+       /* ineligible */
+-      if (zone > sc->reclaim_idx) {
++      if (!folio_test_lru(folio) || zone > sc->reclaim_idx) {
+               gen = folio_inc_gen(lruvec, folio, false);
+               list_move_tail(&folio->lru, &lrugen->folios[gen][type][zone]);
+               return true;
index b41d02c6e07be3581f99756cfe02abba2512ec44..bf1dae738620de98f4dc42648efdf7de3155e2a3 100644 (file)
@@ -131,3 +131,4 @@ serial-qcom-geni-revert-broken-hibernation-support.patch
 serial-qcom-geni-fix-shutdown-race.patch
 serial-qcom-geni-fix-dma-rx-cancellation.patch
 serial-qcom-geni-fix-receiver-enable.patch
+mm-vmscan.c-fix-oom-on-swap-stress-test.patch