diff options
| author | Kemeng Shi <[email protected]> | 2023-08-04 19:04:49 +0800 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2023-08-21 13:37:42 -0700 |
| commit | 7545e2f20aebf4da413be00384c4245eda5beb4d (patch) | |
| tree | fc50a4c4e537958bf8edf02e45b2e398d8dee88c /tools/perf/scripts/python/futex-contention.py | |
| parent | 7c0a84bd0dc214a710305fbc0f407b8e7c410762 (diff) | |
mm/compaction: skip page block marked skip in isolate_migratepages_block
Move migrate_pfn to page block end when block is marked skip to avoid
unnecessary scan retry of that block from upper caller. For example,
compact_zone may wrongly rescan skip page block with finish_pageblock
set as following:
1. cc->migrate point to the start of page block
2. compact_zone record last_migrated_pfn to cc->migrate
3. compact_zone->isolate_migratepages->isolate_migratepages_block
tries to scan the block. The low_pfn maybe moved forward to middle of
block because of free pages at beginning of block.
4. we find first lru page could be isolated but block was exclusive
marked skip.
5. abort isolate_migratepages_block and make cc->migrate_pfn point to
found lru page at middle of block.
6. compact_zone find cc->migrate_pfn and last_migrated_pfn are in the
same block and wrongly rescan the block with finish_pageblock set.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Kemeng Shi <[email protected]>
Reviewed-by: Baolin Wang <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: Mel Gorman <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/futex-contention.py')
0 files changed, 0 insertions, 0 deletions