[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1a6d8295-e27b-4440-a367-af0432a7af4f@kernel.org>
Date: Fri, 6 Feb 2026 10:02:48 +0100
From: "David Hildenbrand (Arm)" <david@...nel.org>
To: Dev Jain <dev.jain@....com>, Vernon Yang <vernon2gm@...il.com>
Cc: akpm@...ux-foundation.org, lorenzo.stoakes@...cle.com, ziy@...dia.com,
baohua@...nel.org, lance.yang@...ux.dev, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Vernon Yang <yanglincheng@...inos.cn>
Subject: Re: [PATCH mm-new v6 2/5] mm: khugepaged: refine scan progress number
On 2/5/26 15:25, Dev Jain wrote:
>
> On 05/02/26 5:41 pm, David Hildenbrand (arm) wrote:
>> On 2/5/26 07:08, Vernon Yang wrote:
>>> On Thu, Feb 5, 2026 at 5:35 AM David Hildenbrand (arm)
>>> <david@...nel.org> wrote:
>>>
>>> I guess, your meaning is "min(_pte - pte + 1, HPAGE_PMD_NR)", not max().
>>
>> Yes!
>>
>>>
>>>
>>> I'm also worried that the compiler can't optimize this since the body of
>>> the loop is complex, as with Dev's opinion [1].
>>
>> Why do we even have to optimize this? :)
>>
>> Premature ... ? :)
>
>
> I mean .... we don't, but the alternate is a one liner using max().
I'm fine with the max(), but it still seems like adding complexity to
optimize something that is nowhere prove to really be a problem.
--
Cheers,
David
Powered by blists - more mailing lists