Re: kmem_cache_attr (was Re: [PATCH 04/36] usercopy: Prepare for usercopy whitelisting)

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

 



On Wed, Jan 17, 2018 at 11:42:34AM -0600, Christopher Lameter wrote:
> On Tue, 16 Jan 2018, Matthew Wilcox wrote:
> 
> > struct kmem_cache_attr {
> > 	char name[16];
> 
> That doesnt work. memcg needs long slab names. Sigh.

Oof.  That's ugly.  Particularly ugly in that it could actually share the
attr with the root cache, except for the name.

We could put a char * in the kmem_cache which (if not NULL) overrides
the attr->name?  Probably want a helper to replace the endearingly short
's->name'.  Something like:

#define slab_name(s)	s->name ?: s->attr->name

--
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]
  Powered by Linux