Re: [PATCH mm-new v6 2/5] mm: khugepaged: refine scan progress number
From: David Hildenbrand (Arm)
Date: Fri Feb 06 2026 - 04:09:09 EST
On 2/5/26 15:30, Dev Jain wrote:
On 05/02/26 7:55 pm, Dev Jain wrote:
On 05/02/26 5:41 pm, David Hildenbrand (arm) wrote:
Yes!
Why do we even have to optimize this? :)
Premature ... ? :)
I mean .... we don't, but the alternate is a one liner using max().
The objective is to compute the number of iterations of the for-loop.
It just seems weird to me to track that in the loop, when we have the
loop iterator, which *literally* does that only.
I realize I shouldn't have bolded out the "literally" - below I wrote that
I won't shout, but the bold seems like shouting :)
Heh.
The thing is that the loop iterator does not quite what we want, otherwise we wouldn't have to mess with max() etc.
--
Cheers,
David