]> git.proxmox.com Git - pve-kernel.git/blame - patches/kernel/0019-revert-mm-compatction-fix-set-skip-in.patch
build: re-enable BTF
[pve-kernel.git] / patches / kernel / 0019-revert-mm-compatction-fix-set-skip-in.patch
CommitLineData
2162f4c4
TL
1From 025cbf4866306fe4823e8c316c20bdaddc6a0340 Mon Sep 17 00:00:00 2001
2From: Vlastimil Babka <vbabka@suse.cz>
3Date: Fri, 13 Jan 2023 18:33:45 +0100
4Subject: Revert "mm/compaction: fix set skip in fast_find_migrateblock"
5
6commit 95e7a450b8190673675836bfef236262ceff084a upstream.
7
8This reverts commit 7efc3b7261030da79001c00d92bc3392fd6c664c.
9
10We have got openSUSE reports (Link 1) for 6.1 kernel with khugepaged
11stalling CPU for long periods of time. Investigation of tracepoint data
12shows that compaction is stuck in repeating fast_find_migrateblock()
13based migrate page isolation, and then fails to migrate all isolated
14pages.
15
16Commit 7efc3b726103 ("mm/compaction: fix set skip in fast_find_migrateblock")
17was suspected as it was merged in 6.1 and in theory can indeed remove a
18termination condition for fast_find_migrateblock() under certain
19conditions, as it removes a place that always marks a scanned pageblock
20from being re-scanned. There are other such places, but those can be
21skipped under certain conditions, which seems to match the tracepoint
22data.
23
24Testing of revert also appears to have resolved the issue, thus revert
25the commit until a more robust solution for the original problem is
26developed.
27
28It's also likely this will fix qemu stalls with 6.1 kernel reported in
29Link 2, but that is not yet confirmed.
30
31Link: https://bugzilla.suse.com/show_bug.cgi?id=1206848
32Link: https://lore.kernel.org/kvm/b8017e09-f336-3035-8344-c549086c2340@kernel.org/
33Link: https://lore.kernel.org/lkml/20230125134434.18017-1-mgorman@techsingularity.net/
34Fixes: 7efc3b726103 ("mm/compaction: fix set skip in fast_find_migrateblock")
35Cc: <stable@vger.kernel.org>
36Tested-by: Pedro Falcato <pedro.falcato@gmail.com>
37Acked-by: Mel Gorman <mgorman@techsingularity.net>
38Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
39Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
40Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
41---
42 mm/compaction.c | 1 +
43 1 file changed, 1 insertion(+)
44
45diff --git a/mm/compaction.c b/mm/compaction.c
46index ca1603524bbe0..8238e83385a79 100644
47--- a/mm/compaction.c
48+++ b/mm/compaction.c
49@@ -1839,6 +1839,7 @@ static unsigned long fast_find_migrateblock(struct compact_control *cc)
50 pfn = cc->zone->zone_start_pfn;
51 cc->fast_search_fail = 0;
52 found_block = true;
53+ set_pageblock_skip(freepage);
54 break;
55 }
56 }
57--
58cgit