From: David Hildenbrand <david@redhat.com>
To: Wei Yang <richard.weiyang@gmail.com>, Michal Hocko <mhocko@suse.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
vbabka@suse.cz, surenb@google.com, jackmanb@google.com,
hannes@cmpxchg.org, ziy@nvidia.com, lorenzo.stoakes@oracle.com,
Liam.Howlett@oracle.com, rppt@kernel.org, iamjoonsoo.kim@lge.com,
linux-mm@kvack.org
Subject: Re: [PATCH 0/2] mm/compaction: some fix for the range passed to pageblock_pfn_to_page()
Date: Wed, 8 Oct 2025 11:55:38 +0200 [thread overview]
Message-ID: <519c13e0-6b68-4987-8602-7b9ba47daee0@redhat.com> (raw)
In-Reply-To: <20251008091301.44xerz33fmrgnjyt@master>
On 08.10.25 11:13, Wei Yang wrote:
> On Wed, Oct 08, 2025 at 09:52:51AM +0200, Michal Hocko wrote:
>> On Wed 08-10-25 02:32:18, Wei Yang wrote:
>>> On Tue, Oct 07, 2025 at 06:29:22PM -0700, Andrew Morton wrote:
>>>> On Thu, 2 Oct 2025 03:31:38 +0000 Wei Yang <richard.weiyang@gmail.com> wrote:
>>>>
>>>>> 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:
>>>>
>>>> What do you think might be the worst-case userspace-visible effects
>>>> of the bug?
>>>
>>> I don't see userspace-visible effect yet.
>>>
>>> Since I lack the knowledge of the consequence of isolating cross zone range,
>>> currently I can't tell the effect accurately.
>>>
>>> The worst case in my mind is we put some page on a different zone's freelist.
>>> But I don't totally understand the behavior now.
>>
>> Is there any actual problem to fix here then?
>
> I don't see an actual problem in practice yet.
We should avoid talking about "fix" then. Let me take a look at the patches.
--
Cheers
David / dhildenb
next prev parent reply other threads:[~2025-10-08 9:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
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
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 [this message]
2025-11-11 23:32 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=519c13e0-6b68-4987-8602-7b9ba47daee0@redhat.com \
--to=david@redhat.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=jackmanb@google.com \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@suse.com \
--cc=richard.weiyang@gmail.com \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox