Re: [PATCH] mm: vmalloc: Use the vmap_area_lock to protect ne_fit_preload_node

From: Sebastian Andrzej Siewior
Date: Mon Oct 07 2019 - 13:36:50 EST


On 2019-10-07 18:56:11 [+0200], Uladzislau Rezki wrote:
> Actually there is a high lock contention on vmap_area_lock, because it
> is still global. You can have a look at last slide:
>
> https://linuxplumbersconf.org/event/4/contributions/547/attachments/287/479/Reworking_of_KVA_allocator_in_Linux_kernel.pdf
>
> so this change will make it a bit higher. From the other hand i agree
> that for rt it should be fixed, probably it could be done like:
>
> ifdef PREEMPT_RT
> migrate_disable()
> #else
> preempt_disable()
> ...
>
> but i am not sure it is good either.

What is to be expected on average? Is the lock acquired and then
released again because the slot is empty and memory needs to be
allocated or can it be assumed that this hardly happens?

Sebastian