Re: Excessive TLB flush ranges

Thomas Gleixner
2023-05-16T14:22:17Z

On Tue, May 16 2023 at 18:05, Baoquan He wrote:
> On 05/16/23 at 11:03am, Thomas Gleixner wrote:
>> static bool __purge_vmap_area_lazy(unsigned long start, unsigned long end)
>> {
>> - unsigned long resched_threshold;
>> + unsigned long resched_threshold, num_entries = 0, num_alias_entries = 0;
>> + struct vmap_area alias_va = { .va_start = start, .va_end = end };
>
> Note that the start and end passed in are not only direct map which is
> alias of va. It is the range which has done merging on direct map range
> and all dirty range of vbq in _vm_unmap_aliases(). We may need to append
> below draft code on your patch to at least flush the direct map range
> separately.

Indeed. Missed that one. What a maze.