> On Sep 29, 2026, at 15:39, David Hildenbrand (Arm) <[email protected]> wrote:
> 
> On 9/27/26 04:54, Muchun Song wrote:
>> The vmemmap optimization helpers currently live in mm/sparse.h,
>> which is an internal MM header. That works for MM code, but
>> prevents powerpc from using the same interfaces without including a
>> private header.
>> 
>> Move the declarations and inline helpers to vmemmap-optimization.h.
>> This is a preparatory change for powerpc, which has its own vmemmap
>> optimization implementation and needs to use the common vmemmap
>> optimization interfaces from architecture code.
> 
> Which raises the question why powerpc was special and will remain special. 
> Wha's
> the big problem here that powerpc must do special things?

Good question. I also don't think PowerPC needs special handling,
but when HVO logic was introduced for PowerPC, it handled HVO on
its own. From my preliminary analysis, the reason it didn't reuse
the generic logic initially may be related to the fact that
PowerPC's section size is 16M. With a 64k base page, a single page
can cover the vmemmap range of multiple sections, and the current
generic logic doesn't cover this case.

However, completely removing PowerPC's special handling is already
in my follow-up plan. We need to wait for the current series to enter
the mainline, and then we can proceed gradually.

> 
> Change itself looks good.
> 
> Acked-by: David Hildenbrand (Arm) <[email protected]>

Thanks for your review.

Muchun,
Thanks

> 
> -- 
> Cheers,
> 
> David


Reply via email to