linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Uladzislau Rezki <urezki@gmail.com>
To: Baoquan He <bhe@redhat.com>
Cc: "Uladzislau Rezki (Sony)" <urezki@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
	Lorenzo Stoakes <lstoakes@gmail.com>,
	Christoph Hellwig <hch@infradead.org>,
	Matthew Wilcox <willy@infradead.org>,
	Nicholas Piggin <npiggin@gmail.com>,
	Oleksiy Avramchenko <oleksiy.avramchenko@sony.com>,
	Roman Gushchin <roman.gushchin@linux.dev>
Subject: Re: [PATCH v2 1/3] mm: vmalloc: Avoid of calling __find_vmap_area() twise in __vunmap()
Date: Thu, 22 Dec 2022 15:43:42 +0100	[thread overview]
Message-ID: <Y6RtHp9RAKS76doY@pc636> (raw)
In-Reply-To: <Y6RBpl62gDoJiEu+@MiWiFi-R3L-srv>

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


      reply	other threads:[~2022-12-22 14:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-21 17:44 [PATCH v2 1/3] mm: vmalloc: Avoid of calling __find_vmap_area() twise in __vunmap() Uladzislau Rezki (Sony)
2022-12-21 17:44 ` [PATCH v2 2/3] mm: vmalloc: Switch to find_unlink_vmap_area() in vm_unmap_ram() Uladzislau Rezki (Sony)
2022-12-22  8:50   ` Christoph Hellwig
2022-12-21 17:44 ` [PATCH v2 3/3] mm: vmalloc: Replace BUG_ON() by WARN_ON_ONCE() Uladzislau Rezki (Sony)
2022-12-21 19:13   ` Lorenzo Stoakes
2022-12-21 19:11 ` [PATCH v2 1/3] mm: vmalloc: Avoid of calling __find_vmap_area() twise in __vunmap() Lorenzo Stoakes
2022-12-22 14:22   ` Uladzislau Rezki
2022-12-22  8:56 ` Christoph Hellwig
2022-12-22 14:41   ` Uladzislau Rezki
2022-12-22 15:01     ` Christoph Hellwig
2022-12-22 17:02       ` Uladzislau Rezki
2022-12-22 11:38 ` Baoquan He
2022-12-22 14:43   ` Uladzislau Rezki [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y6RtHp9RAKS76doY@pc636 \
    --to=urezki@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lstoakes@gmail.com \
    --cc=npiggin@gmail.com \
    --cc=oleksiy.avramchenko@sony.com \
    --cc=roman.gushchin@linux.dev \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).