Re: [PATCH] mm: reduce tlb flush range when changing vma protection

From: Nadav Amit
Date: Tue Mar 08 2022 - 23:14:11 EST




> On Mar 8, 2022, at 6:57 PM, Bibo Mao <maobibo@xxxxxxxxxxx> wrote:
>
> numa worker will periodically change vma prot with PROT_NONE, by
> default it will scan 256M vma memory size with pmd stepping size.
> If there are fewer pages changed with PROT_NONE, tlb flush is called
> with pmd size. This patch will calculate flush range for those
> pages with pte prot changed, it will reduce size for tlb flush.
>
> Signed-off-by: Bibo Mao <maobibo@xxxxxxxxxxx>

Hi Bibo,

I finally managed to make v3 of a patchiest, which I think does
something similar to what you are looking for (without introducing
yet another TLB batching mechanism).

Have a look at [1] and let me know if that would satisfy you.


[1] https://lore.kernel.org/linux-mm/20220309041043.302261-4-namit@xxxxxxxxxx/T/#u