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