Re: [patch 1/6] mm/vmalloc: Prevent stale TLBs in fully utilized blocks

Thomas Gleixner
2023-05-24T12:49:31Z

On Wed, May 24 2023 at 13:36, Uladzislau Rezki wrote:
> On Wed, May 24, 2023 at 07:24:43PM +0800, Baoquan He wrote:
>> Yeah, because $X is not yet unmapped, the block could have unmapped part
>> flushed, or unflushed. For unflushed part, it's got flushed with $X
>> altogether in the purge list.
>>
> If we gurantee that vb is fully flushed, then just do not add it it
> purge list:

There is no such guarantee today and there wont be one even with patch
3/6 applied because:

unmap_aliases()
flush(dirty_min/max)
reset(dirty_min/max)

vb_free(lastmapping)
vunmap_range_noflush();
vb->dirty += order;
if (vb->dirty == VMAP_BBMAP_BITS)
free_block(vb); <-- the TLBs related to @lastmapping are
_NOT_ yet flushed.

Thanks,

tglx