Subject: Re: Excessive TLB flush ranges

From: Thomas Gleixner <[email-masked]>
Date: Tue, 16 May 2023 08:46:03 +0200

On Tue, May 16 2023 at 08:37, Thomas Gleixner wrote:
> On Mon, May 15 2023 at 22:31, Russell King wrote:
>> In the case you have, are "start" and "end" set on function entry
>> to a range, or are they set to ULONG_MAX,0 ? What I'm wondering is
>> whether we could get away with just having flush_tlb_kernel_vas().
>>
>> Whether that's acceptable to others is a different question :)
>
> As I said flush_tlb_kernel_vas() should be
>
> void flush_tlb_kernel_vas(struct list_head *list, unsigned int num_entries):
>
> So that an architecture can decide whether it's worth to do walk the
> entries or whether it resorts to a flush all.

The only issue is that the flush range which is handed in from
_vm_unmap_aliases(), i.e. the conglomorate of to be mopped up TLBs is an
aggregate too. In this particular BPF case it's always one page, but
that obviously might end up being a horrible large range too.

Though there is no way to do that fake vmap_area trick I used in
__purge_vmap_area_lazy(). Bah!

Thanks,

        tglx

_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel