From: Hao Li <hao.li@linux.dev>
To: Harry Yoo <harry@kernel.org>
Cc: vbabka@kernel.org, akpm@linux-foundation.org, cl@gentwo.org,
rientjes@google.com, roman.gushchin@linux.dev,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] mm/slub: introduce helpers for node partial slab state
Date: Mon, 1 Jun 2026 13:26:31 +0800 [thread overview]
Message-ID: <ah0VlxGBk11LRg53@fedora> (raw)
In-Reply-To: <5ed81b4a-1d18-4535-a18c-1bb31969ae78@kernel.org>
On Mon, Jun 01, 2026 at 12:38:48PM +0900, Harry Yoo wrote:
>
>
> On 5/29/26 12:50 PM, Hao Li wrote:
> > Wrap partial slab count inc/dec and flag set/clear into
> > helper functions to reduce code duplication.
> >
> > Note that __add_partial() is called locklessly in
> > early_kmem_cache_node_alloc(), but since there is no such use case for
> > removal, __remove_partial() does not exist.
>
> nit: __remove_partial() -> clear_partial_node_state()
Ah, in this sentence, I just wanted to clarify that __remove_partial doesn't
exist. it's not a typo :)
> oh wait, it does exist. Let's drop this paragraph?
This paragraph is just a quick side note to explain why __remove_partial()
doesn't exist. I noticed that __add_partial lacks a symmetric counterpart,
which felt a bit abrupt/inconsistent, so I wanted to share some context on why
that is.
Historically, the __remove_partial function did exist. Back then, we had a use
case where free_partial called __remove_partial without holding the lock.
Later, free_partial was changed to call remove_partial under the lock, which is
why __remove_partial was eventually removed in commit
52b4b950b50740bff507a62907e86710743c22e7.
>
> Otherwise LGTM!
> Reviewed-by: Harry Yoo (Oracle) <harry@kernel.org>
Thanks!
>
> > Suggested-by: Harry Yoo <harry@kernel.org>
> > Signed-off-by: Hao Li <hao.li@linux.dev>
>
--
Thanks,
Hao
next prev parent reply other threads:[~2026-06-01 5:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 3:50 [PATCH v3 0/2] mm/slub: batch partial slab list operations Hao Li
2026-05-29 3:50 ` [PATCH v3 1/2] mm/slub: introduce helpers for node partial slab state Hao Li
2026-06-01 3:38 ` Harry Yoo
2026-06-01 5:26 ` Hao Li [this message]
2026-06-01 6:17 ` Harry Yoo
2026-05-29 3:50 ` [PATCH v3 2/2] mm/slub: detach and reattach partial slabs in batch Hao Li
2026-06-01 3:51 ` Harry Yoo
2026-05-29 8:01 ` [PATCH v3 0/2] mm/slub: batch partial slab list operations Vlastimil Babka (SUSE)
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=ah0VlxGBk11LRg53@fedora \
--to=hao.li@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=cl@gentwo.org \
--cc=harry@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=vbabka@kernel.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
Powered by JetHome