lkml.org 
[lkml]   [2022]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 1/3] mm: vmalloc: Avoid of calling __find_vmap_area() twise in __vunmap()
On Thu, Dec 22, 2022 at 07:38:14PM +0800, Baoquan He wrote:
> On 12/21/22 at 06:44pm, Uladzislau Rezki (Sony) wrote:
> > Currently __vunmap() path calls __find_vmap_area() two times. One on
> > entry to check that area exists, second time inside remove_vm_area()
> > function that also performs a new search of VA.
> >
> > In order to improvie it from a performance point of view we split
> > remove_vm_area() into two new parts:
> > - find_unlink_vmap_area() that does a search and unlink from tree;
> > - __remove_vm_area() that does a removing but without searching.
> >
> > In this case there is no any functional change for remove_vm_area()
> > whereas vm_remove_mappings(), where a second search happens, switches
> > to the __remove_vm_area() variant where already detached VA is passed
> > as a parameter, so there is no need to find it again.
>
> I like this patch. This takes off the va->vm clearning too. Finally I
> don't need to worry about the va->flags clearing during unmapping
> when reading out vmap_block areas.
>
Thanks. This patch was one of the reason to help out with the per-cpu
busy areas tracking/reading of your work :)

--
Uladzsislau Rezki

\
 
 \ /
  Last update: 2023-03-26 23:17    [W:0.111 / U:1.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site