linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hao Li <hao.li@linux.dev>
To: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Cc: vbabka@kernel.org, harry@kernel.org, akpm@linux-foundation.org,
	 cl@gentwo.org, rientjes@google.com, roman.gushchin@linux.dev,
	 linux-mm@kvack.org, linux-kernel@vger.kernel.orgg
Subject: Re: [RFC PATCH] slub: spill refill leftover objects into percpu sheaves
Date: Mon, 20 Apr 2026 11:18:28 +0800	[thread overview]
Message-ID: <ixwynz2hiu4q5jscizqxkg74z57cfzpzeoyxz3ignatnebdoba@iww4m6byj5wo> (raw)
In-Reply-To: <87a4v47xk5.fsf@intel.com>

On Wed, Apr 15, 2026 at 01:55:54PM -0700, Vinicius Costa Gomes wrote:
> I was also looking at these regressions, but I went from a different
> direction, and ended up with 3 patches:
> 
> 1. the regressions showed a lot of increase in the cache misses,
>    which gave me the idea that a cache would help (and it seemed to help)
> 
> 2. Allowing smaller refills (but potentially more frequent);
> 
> 3. A cute (but with small impact) use of prefetch();
> 
> The numbers are here (the commentary from the bot are very hit or miss,
> so don't pay too much attention to them):
> 
> https://github.com/vcgomes/linux/commit/c898c39ee8def5252942281353eda6acdd83d4ea
> 
> I am re-running the tests against a more recent tree, but if you
> want to take a look:
> 
> https://github.com/vcgomes/linux/tree/mm-sheaves-regression-timerfd
> 
> Also, if you feel it's useful, I can send a RFC.
> 

Hi Vinicius,

I tested the three patches in your GitHub repository. Under a 96-process stress
workload, mmap2 achieved about a 3% performance improvement.

For the slub stats, I observed some differences. Here are the results:

(baseline vs 3 patches)
alloc_fastpath +4.6%
alloc_slowpath +0% (and no slowpath in both test)
free_fastpath +0%
free_slowpath +189%
alloc_slab +247%
free_slab +247%
barn_get +8%
barn_put +8%
barn_get_fail +16%
barn_put_fail +0%
free_add_partial -37%
free_remove_partial +247%
sheaf_refill +3.88%

I notice one thing that seems consistent with my approach is the churn in
alloc_slab and free_slab. My impression is that this may be a common issue with
solutions designed at the per-CPU level...

-- 
Thanks,
Hao


      parent reply	other threads:[~2026-04-20  3:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-10 11:16 Hao Li
2026-04-14  8:39 ` Harry Yoo (Oracle)
2026-04-14  9:59   ` Hao Li
2026-04-15 10:20     ` Harry Yoo (Oracle)
2026-04-16  7:58       ` Hao Li
2026-04-17  6:00         ` Harry Yoo (Oracle)
2026-04-20 11:40           ` Hao Li
2026-04-21  3:35             ` Harry Yoo (Oracle)
2026-04-16  8:13       ` Hao Li
2026-04-15 20:55 ` Vinicius Costa Gomes
2026-04-16  5:49   ` Hao Li
2026-04-17  8:18     ` Vlastimil Babka (SUSE)
2026-04-17  9:40     ` Harry Yoo (Oracle)
2026-04-20  3:18   ` Hao Li [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=ixwynz2hiu4q5jscizqxkg74z57cfzpzeoyxz3ignatnebdoba@iww4m6byj5wo \
    --to=hao.li@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=cl@gentwo.org \
    --cc=harry@kernel.org \
    --cc=linux-kernel@vger.kernel.orgg \
    --cc=linux-mm@kvack.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=vbabka@kernel.org \
    --cc=vinicius.gomes@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