Re: [PATCH 08/11] x86/mm: enable broadcast TLB invalidation for multi-threaded processes

From: Nadav Amit
Date: Wed Dec 25 2024 - 18:33:25 EST


>
>
> On 23 Dec 2024, at 4:55, Rik van Riel <riel@xxxxxxxxxxx> wrote:
>
> @@ -1049,9 +1341,12 @@ void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,
> * a local TLB flush is needed. Optimize this use-case by calling
> * flush_tlb_func_local() directly in this case.
> */
> - if (cpumask_any_but(mm_cpumask(mm), cpu) < nr_cpu_ids) {
> + if (IS_ENABLED(CONFIG_CPU_SUP_AMD) && mm->context.broadcast_asid) {
> + broadcast_tlb_flush(info);
>

I think broadcast_asid is defined within an ifdef, so the IS_ENABLED() here
would not save you from having to use ifdef.