From: Vlastimil Babka <vbabka@suse.cz>
To: Harry Yoo <harry.yoo@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Lameter <cl@gentwo.org>,
David Rientjes <rientjes@google.com>,
Roman Gushchin <roman.gushchin@linux.dev>,
Hao Li <hao.li@linux.dev>, Alexei Starovoitov <ast@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Uladzislau Rezki <urezki@gmail.com>,
Suren Baghdasaryan <surenb@google.com>,
linux-mm@kvack.org
Subject: Re: [PATCH V2 0/2] mm/slab: support kmalloc_nolock() -> kfree[_rcu]()
Date: Tue, 10 Feb 2026 15:08:23 +0100 [thread overview]
Message-ID: <435e40be-fa79-4e57-83b4-5c3f5114cac2@suse.cz> (raw)
In-Reply-To: <20260210044642.139482-1-harry.yoo@oracle.com>
On 2/10/26 05:46, Harry Yoo wrote:
> This is separated from the RFC version of "k[v]free_rcu() improvements"
> series [1], as these changes are relatively small and beneficial for BPF
> because it enables the bpf code to use kfree_rcu() instead of
> call_rcu() + kfree_nolock().
>
> Patch 1 allows kfree() and kfree_rcu() to be used with objects that are
> allocated from kmalloc_nolock().
>
> Patch 2 is a cleanup that frees a bit used to record whether obj_exts
> was allocated using kmalloc_nolock() or kmalloc(), since now both cases
> can be freed with kfree().
>
> [1] https://lore.kernel.org/linux-mm/20260206093410.160622-1-harry.yoo@oracle.com
Thanks, added to slab/for-next
> v1 -> v2:
> - Added Catalin's Reviewed-by tag on patch 1, and Alexei's Acked-by tag
> on patch 2 that I forgot to add. Thanks!
>
> - Fix calling kfree() in free_slab_obj_exts() and alloc_slab_obj_exts()
> when !allow_spin. Pass allow_spin parameter down to free_slab_obj_exts().
>
> V1: https://lore.kernel.org/linux-mm/20260209121013.50475-1-harry.yoo@oracle.com
>
> Harry Yoo (2):
> mm/slab: allow freeing kmalloc_nolock()'d objects using kfree[_rcu]()
> mm/slab: drop the OBJEXTS_NOSPIN_ALLOC flag from enum objext_flags
>
> include/linux/memcontrol.h | 3 +--
> include/linux/rcupdate.h | 4 ++--
> mm/kmemleak.c | 22 ++++++++++-----------
> mm/slub.c | 39 +++++++++++++++++++++++++++-----------
> 4 files changed, 41 insertions(+), 27 deletions(-)
>
>
> base-commit: f6ed7e47c1fc78e78c9bfeb668b1ad9ba5c58120
prev parent reply other threads:[~2026-02-10 14:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-10 4:46 Harry Yoo
2026-02-10 4:46 ` [PATCH V2 1/2] mm/slab: allow freeing kmalloc_nolock()'d objects using kfree[_rcu]() Harry Yoo
2026-02-10 4:46 ` [PATCH V2 2/2] mm/slab: drop the OBJEXTS_NOSPIN_ALLOC flag from enum objext_flags Harry Yoo
2026-02-10 8:57 ` Hao Li
2026-02-10 10:32 ` Harry Yoo
2026-02-10 14:08 ` Vlastimil Babka [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=435e40be-fa79-4e57-83b4-5c3f5114cac2@suse.cz \
--to=vbabka@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=ast@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=cl@gentwo.org \
--cc=hao.li@linux.dev \
--cc=harry.yoo@oracle.com \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=surenb@google.com \
--cc=urezki@gmail.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