OSDN Git Service

mm: add priority threshold to __purge_vmap_area_lazy()
authorUladzislau Rezki (Sony) <urezki@gmail.com>
Thu, 24 Jan 2019 11:56:48 +0000 (12:56 +0100)
committer0ranko0P <ranko0p@outlook.com>
Tue, 24 Dec 2019 20:42:37 +0000 (04:42 +0800)
commit1546a777059bf6617d40f03f125dfa26f5d0679d
tree38930020307d956e5a236512c8717eb968d3ce6d
parent57d03366272e66f50b8f4ffd1dd6988b2e720ce8
mm: add priority threshold to __purge_vmap_area_lazy()

commit 763b218ddfaf ("mm: add preempt points into
__purge_vmap_area_lazy()")

introduced some preempt points, one of those is making an
allocation more prioritized over lazy free of vmap areas.

Prioritizing an allocation over freeing does not work well
all the time, i.e. it should be rather a compromise.

1) Number of lazy pages directly influence on busy list length
thus on operations like: allocation, lookup, unmap, remove, etc.

2) Under heavy stress of vmalloc subsystem i run into a situation
when memory usage gets increased hitting out_of_memory -> panic
state due to completely blocking of logic that frees vmap areas
in the __purge_vmap_area_lazy() function.

Establish a threshold passing which the freeing is prioritized
back over allocation creating a balance between each other.

Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
mm/vmalloc.c