Excessive TLB flush ranges

Russell King (Oracle) linux at armlinux.org.uk
Tue May 16 01:48:30 PDT 2023


On Tue, May 16, 2023 at 10:44:07AM +0200, Thomas Gleixner wrote:
> On Tue, May 16 2023 at 09:19, Russell King wrote:
> > On Tue, May 16, 2023 at 08:37:18AM +0200, Thomas Gleixner wrote:
> >> 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.
> >
> > Is "num_entries" what an arch would want to use? How would it use that?
> > It doesn't tell an arch whether there is a large range of many list
> > entries, or a single entry covering a large range.
> 
> Does it matter?
> 
> The total number of entries to flush is what accumulates and at some
> architecture specific threshold that becomes more expensive than a full
> flush, independent of the range of the individual list entries, no?

It depends what you mean by "num_entries" - is that the number of
pages to be flushed in total in the range?

If so, what does a valid "start" and "end" range passed to
__purge_vmap_area_lazy() mean for num_entries - does that go to
(end - start) / PAGE_SIZE, or would it still be restricted to the
sum of that per list entry? If so, what's the point of passing in
"start" and "end" to this function?

I'm not familiar with this code...

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!



More information about the linux-arm-kernel mailing list