Re: [PATCH FIX v0] mm: memcg/slab: Uncharge during kmem_cache_free_bulk()

2020-10-12 Thread Roman Gushchin
On Mon, Oct 12, 2020 at 09:03:26AM +0530, Bharata B Rao wrote: > On Fri, Oct 09, 2020 at 11:45:51AM -0700, Roman Gushchin wrote: > > On Fri, Oct 09, 2020 at 11:34:23AM +0530, Bharata B Rao wrote: > > > > Hi Bharata, > > > > > Object cgroup charging is done for all the objects during > > >

Re: [PATCH FIX v0] mm: memcg/slab: Uncharge during kmem_cache_free_bulk()

2020-10-11 Thread Bharata B Rao
On Fri, Oct 09, 2020 at 11:45:51AM -0700, Roman Gushchin wrote: > On Fri, Oct 09, 2020 at 11:34:23AM +0530, Bharata B Rao wrote: > > Hi Bharata, > > > Object cgroup charging is done for all the objects during > > allocation, but during freeing, uncharging ends up happening > > for only one

Re: [PATCH FIX v0] mm: memcg/slab: Uncharge during kmem_cache_free_bulk()

2020-10-09 Thread Roman Gushchin
On Fri, Oct 09, 2020 at 11:34:23AM +0530, Bharata B Rao wrote: Hi Bharata, > Object cgroup charging is done for all the objects during > allocation, but during freeing, uncharging ends up happening > for only one object in the case of bulk allocation/freeing. Yes, it's definitely a problem.

[PATCH FIX v0] mm: memcg/slab: Uncharge during kmem_cache_free_bulk()

2020-10-09 Thread Bharata B Rao
Object cgroup charging is done for all the objects during allocation, but during freeing, uncharging ends up happening for only one object in the case of bulk allocation/freeing. Fix this by having a separate call to uncharge all the objects from kmem_cache_free_bulk() and by modifying