Re: [PATCH v7] mm: assert exclusive nid/zonenum bits at the page/folio access sites

From: David Hildenbrand (Arm)

Date: Mon Jun 29 2026 - 02:23:40 EST


On 6/29/26 05:32, Hui Zhu wrote:
> 2026年6月26日 17:09, "David Hildenbrand (Arm)" <david@xxxxxxxxxx mailto:david@xxxxxxxxxx?to=%22David%20Hildenbrand%20(Arm)%22%20%3Cdavid%40kernel.org%3E > 写到:
>
>
>>
>>>
>>>
>>> Better to factor out a common macro alongside a comment for these two '#if'?
>>>
>> Yes.
>>
>> And while looking at it, doesn't memdesc_section have similar problems? And
>> there are other callers of memdesc_zonenum we wouldn't handle. So the
>> macro approach is only partially helpful I thing.
>>
>> Maybe we should just pass by reference and fixup all callers? Ends up the cleanest.
>>
>
> Hi David,
>
> I think pass by reference is better than macro.

Yeah, as long as there is no other (future memdesc specific) reason to pass by
value. I don't think there is.

>
> Would you like to send this out as a formal patch yourself?
> Or would you prefer I include it in my next version with your

Please review and test the patch (and fixup anything wrong with it), fill in the
patch description (explaining why passing by reference) and send it out.

Feel free to keep yourself author of the patch and add my

Co-developed-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
Signed-off-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>

Above your SOB

--
Cheers,

David