Re: mm: mmu_gather: do not expose delayed_rmap flag

From: Linus Torvalds
Date: Wed Nov 16 2022 - 12:45:34 EST


On Tue, Nov 15, 2022 at 11:49 PM Alexander Gordeev
<agordeev@xxxxxxxxxxxxx> wrote:
>
> Flag delayed_rmap of 'struct mmu_gather' is rather
> a private member, but it is still accessed directly.
> Instead, let the TLB gather code access the flag.

Now, I set it up so that if you don't use delayed_rmap, the
tlb_flush_rmaps() function ends up being an empty inline function, and
as such the compiler should already have done this for you - including
optimizing out the test that then doesn't even matter.

But this patch shouldn't *matter*, but it also isn't wrong, so..

Acked-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

Thanks,

Linus