Re: [RFC PATCH 00/15] kmem_cache instances with static storage duration

From: Al Viro

Date: Thu Jan 15 2026 - 14:43:25 EST


On Thu, Jan 15, 2026 at 11:10:00AM -0800, Christoph Lameter (Ampere) wrote:

> Internal functions exist in the slab allocator that do what you want if
> the opaqueness requirement is dropped. F.e. for the creation of kmalloc
> caches we use do_kmem_cache_create():

Yes, I know. Do you really want to expose e.g. slab_caches and slab_mutex
to the rest of the kernel? Surgery needed to have __kmem_cache_create()
do everything is not large - see the mm/slab_common.c parts in the first
two commits in this series.