Re: [PATCH v1] memcg: Prevent caches to be both OFF_SLAB & OBJFREELIST_SLAB

2016-10-27 Thread Thomas Garnier
On Thu, Oct 27, 2016 at 12:25 AM, Michal Hocko wrote: > The patch is marked for memcg but I do not see any direct relation. > I am not familiar with this code enough probably but if this really is > memcg kmem related, please do not forget to CC Vladimir > Yes, the next

Re: [PATCH v1] memcg: Prevent caches to be both OFF_SLAB & OBJFREELIST_SLAB

2016-10-27 Thread Thomas Garnier
On Thu, Oct 27, 2016 at 12:25 AM, Michal Hocko wrote: > The patch is marked for memcg but I do not see any direct relation. > I am not familiar with this code enough probably but if this really is > memcg kmem related, please do not forget to CC Vladimir > Yes, the next iteration should be

Re: [PATCH v1] memcg: Prevent caches to be both OFF_SLAB & OBJFREELIST_SLAB

2016-10-27 Thread Michal Hocko
The patch is marked for memcg but I do not see any direct relation. I am not familiar with this code enough probably but if this really is memcg kmem related, please do not forget to CC Vladimir On Wed 26-10-16 10:41:28, Thomas Garnier wrote: > While testing OBJFREELIST_SLAB integration with

Re: [PATCH v1] memcg: Prevent caches to be both OFF_SLAB & OBJFREELIST_SLAB

2016-10-27 Thread Michal Hocko
The patch is marked for memcg but I do not see any direct relation. I am not familiar with this code enough probably but if this really is memcg kmem related, please do not forget to CC Vladimir On Wed 26-10-16 10:41:28, Thomas Garnier wrote: > While testing OBJFREELIST_SLAB integration with

Re: [PATCH v1] memcg: Prevent caches to be both OFF_SLAB & OBJFREELIST_SLAB

2016-10-26 Thread Christoph Lameter
On Wed, 26 Oct 2016, Thomas Garnier wrote: > Okay, I think for SLAB we can allow everything except the two flags > mentioned here. No no no. Just allow the flags already defined in include/linux/slab.h that can be specd by subsystems when they call into the slab allocators. > Should I deny

Re: [PATCH v1] memcg: Prevent caches to be both OFF_SLAB & OBJFREELIST_SLAB

2016-10-26 Thread Christoph Lameter
On Wed, 26 Oct 2016, Thomas Garnier wrote: > Okay, I think for SLAB we can allow everything except the two flags > mentioned here. No no no. Just allow the flags already defined in include/linux/slab.h that can be specd by subsystems when they call into the slab allocators. > Should I deny

Re: [PATCH v1] memcg: Prevent caches to be both OFF_SLAB & OBJFREELIST_SLAB

2016-10-26 Thread Thomas Garnier
On Wed, Oct 26, 2016 at 12:08 PM, Christoph Lameter wrote: > Hmmm...Doesnt this belong into memcg_create_kmem_cache() or into > kmem_cache_create() in mm/slab_common.h? Definitely not in an allocator > specific function since this is an issue for all allocators. > >

Re: [PATCH v1] memcg: Prevent caches to be both OFF_SLAB & OBJFREELIST_SLAB

2016-10-26 Thread Thomas Garnier
On Wed, Oct 26, 2016 at 12:08 PM, Christoph Lameter wrote: > Hmmm...Doesnt this belong into memcg_create_kmem_cache() or into > kmem_cache_create() in mm/slab_common.h? Definitely not in an allocator > specific function since this is an issue for all allocators. > > memcg_create_kmem_cache()

Re: [PATCH v1] memcg: Prevent caches to be both OFF_SLAB & OBJFREELIST_SLAB

2016-10-26 Thread Christoph Lameter
Hmmm...Doesnt this belong into memcg_create_kmem_cache() or into kmem_cache_create() in mm/slab_common.h? Definitely not in an allocator specific function since this is an issue for all allocators. memcg_create_kmem_cache() simply assumes that it can pass flags from the kmem_cache structure to

Re: [PATCH v1] memcg: Prevent caches to be both OFF_SLAB & OBJFREELIST_SLAB

2016-10-26 Thread Christoph Lameter
Hmmm...Doesnt this belong into memcg_create_kmem_cache() or into kmem_cache_create() in mm/slab_common.h? Definitely not in an allocator specific function since this is an issue for all allocators. memcg_create_kmem_cache() simply assumes that it can pass flags from the kmem_cache structure to

[PATCH v1] memcg: Prevent caches to be both OFF_SLAB & OBJFREELIST_SLAB

2016-10-26 Thread Thomas Garnier
While testing OBJFREELIST_SLAB integration with pagealloc, we found a bug where kmem_cache(sys) would be created with both CFLGS_OFF_SLAB & CFLGS_OBJFREELIST_SLAB. The original kmem_cache is created early making OFF_SLAB not possible. When kmem_cache(sys) is created, OFF_SLAB is possible and if

[PATCH v1] memcg: Prevent caches to be both OFF_SLAB & OBJFREELIST_SLAB

2016-10-26 Thread Thomas Garnier
While testing OBJFREELIST_SLAB integration with pagealloc, we found a bug where kmem_cache(sys) would be created with both CFLGS_OFF_SLAB & CFLGS_OBJFREELIST_SLAB. The original kmem_cache is created early making OFF_SLAB not possible. When kmem_cache(sys) is created, OFF_SLAB is possible and if