On Fri, Jul 8, 2022 at 8:08 PM Nadav Amit <namit@xxxxxxxxxx> wrote: > > 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()? i am quite sure there are some other platforms having mm_cpumask(). for example, arm(not arm64). but i am not exactly sure of the situation of each individual arch. thus, i don't risk changing their source code. but arm64 is the second platform looking for tlbbatch, and ARCH_HAS_MM_CPUMASK only affects tlbbatch. so i would expect those platforms to fill their ARCH_HAS_MM_CPUMASK while they start to bringup their tlbbatch? for this moment, we only need to make certain we don't break x86? does it make sense? Thanks Barry >