Re: [PATCH v5 17/19] mm: memcg/slab: use a single set of kmem_caches for all allocations

2020-06-05 Thread Roman Gushchin
On Fri, Jun 05, 2020 at 06:24:33PM +0200, Vlastimil Babka wrote: > On 5/28/20 12:34 AM, Roman Gushchin wrote: > > diff --git a/mm/slab.h b/mm/slab.h > > index c49a863adb63..57b425d623e5 100644 > > --- a/mm/slab.h > > +++ b/mm/slab.h > ... > > @@ -526,8 +430,7 @@ static inline struct kmem_cache *cac

Re: [PATCH v5 17/19] mm: memcg/slab: use a single set of kmem_caches for all allocations

2020-06-05 Thread Vlastimil Babka
On 5/28/20 12:34 AM, Roman Gushchin wrote: > diff --git a/mm/slab.h b/mm/slab.h > index c49a863adb63..57b425d623e5 100644 > --- a/mm/slab.h > +++ b/mm/slab.h ... > @@ -526,8 +430,7 @@ static inline struct kmem_cache *cache_from_obj(struct > kmem_cache *s, void *x) >* When kmemcg is not bei

[PATCH v5 17/19] mm: memcg/slab: use a single set of kmem_caches for all allocations

2020-05-27 Thread Roman Gushchin
Instead of having two sets of kmem_caches: one for system-wide and non-accounted allocations and the second one shared by all accounted allocations, we can use just one. The idea is simple: space for obj_cgroup metadata can be allocated on demand and filled only for accounted allocations. It allo