Re: [PATCH v5 14/18] memcg/sl[au]b: shrink dead caches

2012-10-22 Thread Glauber Costa
On 10/19/2012 11:47 PM, Christoph Lameter wrote: > On Fri, 19 Oct 2012, Glauber Costa wrote: > >> An unlikely branch is used to make sure this case does not affect >> performance in the usual slab_free path. >> >> The slab allocator has a time based reaper that would eventually get rid >> of the

Re: [PATCH v5 14/18] memcg/sl[au]b: shrink dead caches

2012-10-22 Thread Glauber Costa
On 10/19/2012 11:47 PM, Christoph Lameter wrote: On Fri, 19 Oct 2012, Glauber Costa wrote: An unlikely branch is used to make sure this case does not affect performance in the usual slab_free path. The slab allocator has a time based reaper that would eventually get rid of the objects, but

Re: [PATCH v5 14/18] memcg/sl[au]b: shrink dead caches

2012-10-19 Thread Christoph Lameter
On Fri, 19 Oct 2012, Glauber Costa wrote: > An unlikely branch is used to make sure this case does not affect > performance in the usual slab_free path. > > The slab allocator has a time based reaper that would eventually get rid > of the objects, but we can also call it explicitly, since dead

[PATCH v5 14/18] memcg/sl[au]b: shrink dead caches

2012-10-19 Thread Glauber Costa
In the slub allocator, when the last object of a page goes away, we don't necessarily free it - there is not necessarily a test for empty page in any slab_free path. This means that when we destroy a memcg cache that happened to be empty, those caches may take a lot of time to go away: removing

[PATCH v5 14/18] memcg/sl[au]b: shrink dead caches

2012-10-19 Thread Glauber Costa
In the slub allocator, when the last object of a page goes away, we don't necessarily free it - there is not necessarily a test for empty page in any slab_free path. This means that when we destroy a memcg cache that happened to be empty, those caches may take a lot of time to go away: removing

Re: [PATCH v5 14/18] memcg/sl[au]b: shrink dead caches

2012-10-19 Thread Christoph Lameter
On Fri, 19 Oct 2012, Glauber Costa wrote: An unlikely branch is used to make sure this case does not affect performance in the usual slab_free path. The slab allocator has a time based reaper that would eventually get rid of the objects, but we can also call it explicitly, since dead caches