linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] mm/compaction: some fix for the range passed to pageblock_pfn_to_page()
@ 2025-10-02  3:31 Wei Yang
  2025-10-02  3:31 ` [PATCH 1/2] mm/compaction: check the range to pageblock_pfn_to_page() is within the zone first Wei Yang
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Wei Yang @ 2025-10-02  3:31 UTC (permalink / raw)
  To: akpm, vbabka, surenb, mhocko, jackmanb, hannes, ziy, david,
	lorenzo.stoakes, Liam.Howlett, rppt, iamjoonsoo.kim
  Cc: linux-mm, Wei Yang

During the code reading of isolate_migratepages_range(), first spot the range
passed to pageblock_pfn_to_page() is different from that to
isolate_migratepages_block().

This implies there is a chance that pageblock_pfn_to_page() thinks the range
is in the same zone, but isolate_migratepages_block() will isolate range in
two different zones. This is not what we expect.

Then I found pageblock_pfn_to_page() has an optimization if zone->contiguous,
this means even the range is across two different zones, it will think the
range is within the same zone.

So introduce two patches to fix it:

Patch 1: check the range belongs to the zone first
Patch 2: pass the correct range to pageblock_pfn_to_page()

Wei Yang (2):
  mm/compaction: check the range to pageblock_pfn_to_page() is within
    the zone first
  mm/compaction: fix the range to pageblock_pfn_to_page()

 mm/compaction.c | 37 ++++++++++++++-----------------------
 mm/internal.h   |  3 +++
 2 files changed, 17 insertions(+), 23 deletions(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2025-11-11 23:32 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-02  3:31 [PATCH 0/2] mm/compaction: some fix for the range passed to pageblock_pfn_to_page() Wei Yang
2025-10-02  3:31 ` [PATCH 1/2] mm/compaction: check the range to pageblock_pfn_to_page() is within the zone first Wei Yang
2025-10-08 10:14   ` David Hildenbrand
2025-10-09  2:08     ` Wei Yang
2025-10-09  7:19       ` David Hildenbrand
2025-10-02  3:31 ` [PATCH 2/2] mm/compaction: fix the range to pageblock_pfn_to_page() Wei Yang
2025-10-08 10:17   ` David Hildenbrand
2025-10-08 11:16     ` Michal Hocko
2025-10-09  3:39     ` Wei Yang
2025-10-08  1:29 ` [PATCH 0/2] mm/compaction: some fix for the range passed " Andrew Morton
2025-10-08  2:32   ` Wei Yang
2025-10-08  7:52     ` Michal Hocko
2025-10-08  9:13       ` Wei Yang
2025-10-08  9:55         ` David Hildenbrand
2025-11-11 23:32 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox