Re: [PATCH v7 11/14] x86/mm: Cap flush_tlb_info alignment at 64 bytes

From: Chuyi Zhou

Date: Thu Jun 11 2026 - 12:24:41 EST


On 2026-06-11 11:37 p.m., Nadav Amit wrote:
>
>
> On 09/06/2026 12:17, Chuyi Zhou wrote:
>
>> +#if SMP_CACHE_BYTES > 64
>> +#define FLUSH_TLB_INFO_ALIGN 64
>> +#else
>> +#define FLUSH_TLB_INFO_ALIGN SMP_CACHE_BYTES
>> +#endif
>> +
>
> How about instead doing:
>
> #define FLUSH_TLB_INFO_ALIGN MIN(SMP_CACHE_BYTES, 64)
>
> ?
>

Yes, that looks better to me. It expresses the cap directly.

I will change it to:

#define FLUSH_TLB_INFO_ALIGN MIN(SMP_CACHE_BYTES, 64)

and add an explicit include of <linux/minmax.h> in tlbflush.h so this
does not rely on an indirect include.