linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
To: Hao Li <hao.li@linux.dev>,
	Vinicius Costa Gomes <vinicius.gomes@intel.com>
Cc: 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: Fri, 17 Apr 2026 10:18:52 +0200	[thread overview]
Message-ID: <e9baaed8-4934-403d-87b6-ddd46e852769@kernel.org> (raw)
In-Reply-To: <wamsxmuhcbr6hj5y53bheub4cmkq7pd3psntl66o74k4bmtygi@qhyse67jvr3f>

On 4/16/26 07:49, Hao Li wrote:
> On Wed, Apr 15, 2026 at 01:55:54PM -0700, Vinicius Costa Gomes wrote:
> 
> Great!
> Thanks for sharing those infos!
> 
>> 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.
> 
> 
> I also tried stashing leftover objects into the PCS before, but at the time I
> observed that this could quickly drain the node partial list, which then led to
> slab alloc/free churn, and the end result was a performance regression. So I
> gave up this direction :/
> 
> I took a quick look at the code and performance report in your GitHub repo, and
> the performance gains you showed there are really interesting to me!
> I'm going to try testing it on my own machine as well.
> 
> Also, the idea of a warm_slab looks very interesting. I had previously thought
> about something along similar lines, except that I was considering stashing
> leftover untouched slabs at the per-CPU level. But that would effectively bring
> back the old stale CPU partial list in another form, so I ended up dropping
> that direction. But you direction is really interesting!

I wonder about the conditions when the warm_slab freelist is actually warm.
If we have leftover objects on the slab's freelist after a refill, we didn't
walk that part of the freelist to make it cache-hot. So why is draining that
stashed slab beneficial? Is the benefit rather because of caching more
objects percpu again, and avoiding the partial list and list_lock?

The freelist could be warm in the case the slab was just allocated, but that
should be a minority cases compared to taken from partial list?

> I'd be very happy to see a new approach come out of this. If it's convenient
> for you, I'd love to see an RFC. Thanks!
> 



  reply	other threads:[~2026-04-17  8:19 UTC|newest]

Thread overview: 11+ 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-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) [this message]
2026-04-17  9:40     ` Harry Yoo (Oracle)

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=e9baaed8-4934-403d-87b6-ddd46e852769@kernel.org \
    --to=vbabka@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=cl@gentwo.org \
    --cc=hao.li@linux.dev \
    --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=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