[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <836669ac-473f-4c30-a368-c05bfa86c306@amd.com>
Date: Fri, 23 Jan 2026 16:12:07 +0530
From: "Garg, Shivank" <shivankg@....com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Zi Yan <ziy@...dia.com>, Baolin Wang <baolin.wang@...ux.alibaba.com>,
"Liam R . Howlett" <Liam.Howlett@...cle.com>, Nico Pache
<npache@...hat.com>, David Hildenbrand <david@...nel.org>,
Ryan Roberts <ryan.roberts@....com>, Barry Song <baohua@...nel.org>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Wei Yang <richard.weiyang@...il.com>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
Subject: Re: [PATCH V3 2/5] mm/khugepaged: count small VMAs towards scan limit
On 1/22/2026 5:56 PM, Garg, Shivank wrote:
>
>
> On 1/22/2026 2:14 PM, Lance Yang wrote:
>>
>>
>> On 2026/1/22 15:32, Dev Jain wrote:
>>>
>>> On 19/01/26 12:52 am, Shivank Garg wrote:
>>>> The khugepaged_scan_mm_slot() uses a 'progress' counter to limit the
>>>> amount of work performed and consists of three components:
>>>> 1. Transitioning to a new mm (+1).
>>>> 2. Skipping an unsuitable VMA (+1).
>>>> 3. Scanning a PMD-sized range (+HPAGE_PMD_NR).
>>>>
>>>> Consider a 1MB VMA sitting between two 2MB alignment boundaries:
>>>>
>>>> vma1 vma2 vma3
>>>> +----------+------+----------+
>>>> |2M |1M |2M |
>>>> +----------+------+----------+
>>>> ^ ^
>>>> start end
>>>> ^
>>>> hstart,hend
>>>
>>> Won't such a VMA be skipped by thp_vma_allowable_order()? That internally
>>> checks, apart from eligibility by sysfs, that the extent of the VMA can
>>> map a hugepage.
>>
>> Ah, you're right!
>>
>> I was worrying about a case that doesn't actually happen.
>>
> You're right, thp_vma_allowable_order() is taking care of this, making
> hend <= hstart check redundant.
>
> Thank you for catching this.
>
> I'll drop this change and send revision keeping only the unsigned int type
> change for 'progress'.
>
Hi Andrew,
Please drop this patch.
As Dev and Lance noted that the hend <= hstart handling check is redundant.
The 'progress' variable to unsigned int is not critical either.
Other patches from series remain unchanged.
Sorry for the noise, and thanks.
Regards,
Shivank
Powered by blists - more mailing lists