Re: [PATCH] slub: do not merge cache if slub_debug contains a never-merge flag

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

 



On Fri, 23 Dec 2016, Grygorii Maistrenko wrote:

> > struct kmem_cache *ind_mergeable(size_t size, size_t align,
> >                 unsigned long flags, const char *name, void (*ctor)(void *))
> > {
> >         struct kmem_cache *s;
> >
> >         if (slab_nomerge || (flags & SLAB_NEVER_MERGE))    <----- !!!!!!
> >                 return NULL;
>
> This one check is done on flags passed to kmem_cache_create().
>
> >
> >         if (ctor)
> >                 return NULL;
> >
> >         size = ALIGN(size, sizeof(void *));
> >         align = calculate_alignment(flags,
> 	flags = kmem_cache_flags(size, flags, name, NULL);
>
> I added here the missing line. This updates flags from commandline and
> after this we do not check it.

Then please move the check down below the flags update.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]