Re: Excessive TLB flush ranges

Uladzislau Rezki
2023-05-16T13:42:29Z

> _vm_unmap_aliases() collects dirty ranges from per cpu vmap_block_queue
> (what ever that is) and hands a start..end range to
> __purge_vmap_area_lazy().
>
> As I pointed out already, this can also end up being an excessive range
> because there is no guarantee that those individual collected ranges are
> consecutive. Though I have no idea how to cure that right now.
>
> AFAICT this was done to spare flush IPIs, but the mm folks should be
> able to explain that properly.
>
This is done to prevent generating IPIs. That is why the whole range is
calculated once and a flush occurs only once for all lazily registered VAs.

--
Uladzislau Rezki