lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0A1FA061-9E8E-4E86-A479-EFA9FF083D4F@nvidia.com>
Date: Mon, 19 May 2025 10:35:50 -0400
From: Zi Yan <ziy@...dia.com>
To: David Hildenbrand <david@...hat.com>
Cc: Vlastimil Babka <vbabka@...e.cz>, Oscar Salvador <osalvador@...e.de>,
 Johannes Weiner <hannes@...xchg.org>, linux-mm@...ck.org,
 Andrew Morton <akpm@...ux-foundation.org>,
 Baolin Wang <baolin.wang@...ux.alibaba.com>,
 "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
 Mel Gorman <mgorman@...hsingularity.net>,
 Suren Baghdasaryan <surenb@...gle.com>, Michal Hocko <mhocko@...e.com>,
 Brendan Jackman <jackmanb@...gle.com>, Richard Chang <richardycc@...gle.com>,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 0/4] Make MIGRATE_ISOLATE a standalone bit

On 19 May 2025, at 10:15, David Hildenbrand wrote:

> On 18.05.25 02:20, Zi Yan wrote:
>> On 17 May 2025, at 16:26, Vlastimil Babka wrote:
>>
>>> On 5/9/25 22:01, Zi Yan wrote:
>>>> Hi David and Oscar,
>>>>
>>>> Can you take a look at Patch 2, which changes how online_pages() set
>>>> online pageblock migratetypes? It used to first set all pageblocks to
>>>> MIGRATE_ISOLATE, then let undo_isolate_page_range() move the pageblocks
>>>> to MIGRATE_MOVABLE. After MIGRATE_ISOLATE becomes a standalone bit, all
>>>> online pageblocks need to have a migratetype other than MIGRATE_ISOLATE.
>>>> Let me know if there is any issue with my changes.
>>>>
>>>> Hi Johannes,
>>>>
>>>> Patch 2 now have set_pageblock_migratetype() not accepting
>>>> MIGRATE_ISOLATE. I think it makes code better. Thank you for the great
>>>> feedback.
>>>>
>>>> Hi all,
>>>>
>>>> This patchset moves MIGRATE_ISOLATE to a standalone bit to avoid
>>>> being overwritten during pageblock isolation process. Currently,
>>>> MIGRATE_ISOLATE is part of enum migratetype (in include/linux/mmzone.h),
>>>> thus, setting a pageblock to MIGRATE_ISOLATE overwrites its original
>>>> migratetype. This causes pageblock migratetype loss during
>>>> alloc_contig_range() and memory offline, especially when the process
>>>> fails due to a failed pageblock isolation and the code tries to undo the
>>>> finished pageblock isolations.
>>>
>>> Seems mostly fine to me, just sent suggestion for 4/4.
>>
>> Thanks.
>>
>>> I was kinda hoping that MIGRATE_ISOLATE could stop being a migratetype. But
>>> I also see that it's useful for it to be because then it means it has the
>>> freelists in the buddy allocator, can work via __move_freepages_block() etc.
>>
>> Yeah, I wanted to remove MIGRATE_ISOLATE from migratetype too, but there
>> is a MIGRATE_ISOLATE freelist and /proc/pagetypeinfo also shows isolated
>> free pages.
>
> The latter, we can likely fake.
>
> Is there a reasonable way to remove MIGRATE_ISOLATE completely?
>
> Of course, we could simply duplicate the page lists (one set for isolated, one set for !isolated), or keep it as is and simply have a

That could work. It will change vmcore layout and I wonder if that is a concern
or not.

> separate one that we separate out. So, we could have a migratetype+isolated pair instead.

What do you mean by a migratetype+isolate pair?

>
> Just a thought, did not look into all the ugly details.

Another thought is that maybe caller should keep the isolated free pages instead
to make it actually isolated. We might need to keep per-order isolated free page
stats to fake /proc/pagetypeinfo.

--
Best Regards,
Yan, Zi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ