Re: [PATCH 2/4] mm: rmap: Allow platforms without mm_cpumask to defer TLB flush

From: Nadav Amit
Date: Fri Jul 08 2022 - 04:08:52 EST


On Jul 7, 2022, at 11:59 PM, Barry Song <21cnbao@xxxxxxxxx> wrote:

>> The cpumask_empty() is indeed just another memory access, which is most
>> likely ok. But wouldn’t adding something like CONFIG_ARCH_HAS_MM_CPUMASK
>> make the code simpler and (slightly, certainly slightly) more performant?
>
> Yep. good suggestion, Nadav. So the code will be as below, right?

Hmmm… Although it is likely to work (because only x86 and arm would use this
batch flushing), I think that for consistency ARCH_HAS_MM_CPUMASK should be
correct for all architectures.

Is it really only x86 that has mm_cpumask()?