Re: [PATCH v2 6/6] slab: Introduce kmalloc_nolock() and kfree_nolock().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 11, 2025 at 04:36:30PM +0900, Harry Yoo wrote:
> On Tue, Jul 08, 2025 at 06:53:03PM -0700, Alexei Starovoitov wrote:
> > @@ -1990,8 +1992,14 @@ int alloc_slab_obj_exts(struct slab *slab, struct kmem_cache *s,
> >  	gfp &= ~OBJCGS_CLEAR_MASK;
> >  	/* Prevent recursive extension vector allocation */
> >  	gfp |= __GFP_NO_OBJ_EXT;
> > -	vec = kcalloc_node(objects, sizeof(struct slabobj_ext), gfp,
> > -			   slab_nid(slab));
> > +	if (unlikely(!allow_spin)) {
> > +		size_t sz = objects * sizeof(struct slabobj_ext);
> > +
> > +		vec = kmalloc_nolock(sz, __GFP_ZERO, slab_nid(slab));
> 
> Missing memset()?
> as there is no kcalloc_nolock()...

Oops, there's __GFP_ZERO. nevermind.

-- 
Cheers,
Harry / Hyeonggon




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux