mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: rulinhuang <rulin.huang@intel.com>
Cc: urezki@gmail.com, bhe@redhat.com, colin.king@intel.com,
	hch@infradead.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, lstoakes@gmail.com, tianyou.li@intel.com,
	tim.c.chen@intel.com, wangyang.guo@intel.com,
	zhiguo.zhou@intel.com
Subject: Re: [PATCH v8] mm/vmalloc: Eliminated the lock contention from twice to once
Date: Thu, 7 Mar 2024 12:11:13 -0800	[thread overview]
Message-ID: <20240307121113.16cc480515195f1fe945bbac@linux-foundation.org> (raw)
In-Reply-To: <20240307021440.64967-1-rulin.huang@intel.com>

On Wed,  6 Mar 2024 21:14:40 -0500 rulinhuang <rulin.huang@intel.com> wrote:

> When allocating a new memory area where the mapping address range is
> known, it is observed that the vmap_node->busy.lock is acquired twice.
> 
> The first acquisition occurs in the alloc_vmap_area() function when
> inserting the vm area into the vm mapping red-black tree. The second
> acquisition occurs in the setup_vmalloc_vm() function when updating the
> properties of the vm, such as flags and address, etc.
> 
> Combine these two operations together in alloc_vmap_area(), which
> improves scalability when the vmap_node->busy.lock is contended.
> By doing so, the need to acquire the lock twice can also be eliminated
> to once.
> 
> With the above change, tested on intel sapphire rapids
> platform(224 vcpu), a 4% performance improvement is
> gained on stress-ng/pthread(https://github.com/ColinIanKing/stress-ng),
> which is the stress test of thread creations.
> 

Thanks.  We're late in -rc7 so I'll queue this up for merging in the
next merge window.

      parent reply	other threads:[~2024-03-07 20:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-07  2:14 rulinhuang
2024-03-07  3:38 ` Baoquan He
2024-03-07 19:26 ` Uladzislau Rezki
2024-03-07 20:11 ` Andrew Morton [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=20240307121113.16cc480515195f1fe945bbac@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=colin.king@intel.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lstoakes@gmail.com \
    --cc=rulin.huang@intel.com \
    --cc=tianyou.li@intel.com \
    --cc=tim.c.chen@intel.com \
    --cc=urezki@gmail.com \
    --cc=wangyang.guo@intel.com \
    --cc=zhiguo.zhou@intel.com \
    /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

all inboxes | Powered by JetHome®