Re: [PATCH v3 08/13] mm/slab: change struct slabobj_ext to a union
"Vlastimil Babka (SUSE)" <[email protected]> Fri, 31 Jul 2026 15:52:44 +0200
| Newsgroups | org.kernel.vger.cgroups,org.kernel.vger.linux-kernel,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
On 7/30/26 13:58, Hao Li wrote: > On Mon, Jul 27, 2026 at 02:54:02PM +0200, Vlastimil Babka (SUSE) wrote: >> @@ -7933,7 +7936,7 @@ static int calculate_sizes(struct kmem_cache_args *args, struct kmem_cache *s) >> aligned_size = ALIGN(size, s->align); >> #if defined(CONFIG_SLAB_OBJ_EXT) && defined(CONFIG_64BIT) >> if (slab_args_unmergeable(args, s->flags) && >> - (aligned_size - size >= sizeof(struct slabobj_ext))) >> + (aligned_size - size >= cache_obj_ext_size(s))) > > Nit: cache_obj_ext_size() could return 0, and the checking will always be true. > But I think this is harmless. Yeah should be harmless as then no objexts are used for the cache anyway. Thanks! >> s->flags |= SLAB_OBJ_EXT_IN_OBJ; >> #endif >> size = aligned_size; >> >> -- >> 2.55.0 >> >