[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f6a0b8eb-4e4a-4d37-b3c9-c9d147a7769b@linux.alibaba.com>
Date: Mon, 9 Jun 2025 13:57:29 +0800
From: Baolin Wang <baolin.wang@...ux.alibaba.com>
To: Dev Jain <dev.jain@....com>, akpm@...ux-foundation.org, hughd@...gle.com,
david@...hat.com
Cc: lorenzo.stoakes@...cle.com, Liam.Howlett@...cle.com, npache@...hat.com,
ryan.roberts@....com, ziy@...dia.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] mm: huge_memory: disallow hugepages if the
system-wide THP sysfs settings are disabled
On 2025/6/7 02:47, Dev Jain wrote:
>
> On 06/06/25 10:19 pm, Dev Jain wrote:
>>
>> On 05/06/25 1:30 pm, Baolin Wang wrote:
>>> The MADV_COLLAPSE will ignore the system-wide Anon THP sysfs
>>> settings, which
>>> means that even though we have disabled the Anon THP configuration,
>>> MADV_COLLAPSE
>>> will still attempt to collapse into a Anon THP. This violates the
>>> rule we have
>>> agreed upon: never means never.
>>>
>>> Another rule for madvise, referring to David's suggestion: “allowing
>>> for collapsing
>>> in a VM without VM_HUGEPAGE in the "madvise" mode would be fine".
>>>
>>> To address this issue, should check whether the Anon THP
>>> configuration is disabled
>>> in thp_vma_allowable_orders(), even when the TVA_ENFORCE_SYSFS flag
>>> is set.
>>
>> Did you mean to say "even when the TVA_ENFORCE_SYSFS flag is *not*
>> set"? Because if
>> is set, then we have to check the anon THP sysfs config.
Sorry for the confusion. What I mean is that we should also check
whether the Anon THP is disabled when the TVA_ENFORCE_SYSFS flag is set.
Will update the commit message.
> Otherwise the patch itself looks good to me, so:
>
> Reviewed-by: Dev Jain <dev.jain@....com>
Thanks for reviewing.
Powered by blists - more mailing lists