[PATCH v7 09/19] mm: memcg/slab: charge individual slab objects instead of pages

2020-06-23 Thread Roman Gushchin
Switch to per-object accounting of non-root slab objects. Charging is performed using obj_cgroup API in the pre_alloc hook. Obj_cgroup is charged with the size of the object and the size of metadata: as now it's the size of an obj_cgroup pointer. If the amount of memory has been charged

Re: [PATCH v7 09/19] mm: memcg/slab: charge individual slab objects instead of pages

2020-06-23 Thread Roman Gushchin
On Mon, Jun 22, 2020 at 10:19:25PM -0700, Shakeel Butt wrote: > On Mon, Jun 22, 2020 at 6:58 PM Roman Gushchin wrote: > > > > Switch to per-object accounting of non-root slab objects. > > > > Charging is performed using obj_cgroup API in the pre_alloc hook. > > Obj_cgroup is charged with the size

Re: [PATCH v7 09/19] mm: memcg/slab: charge individual slab objects instead of pages

2020-06-22 Thread Shakeel Butt
On Mon, Jun 22, 2020 at 6:58 PM Roman Gushchin wrote: > > Switch to per-object accounting of non-root slab objects. > > Charging is performed using obj_cgroup API in the pre_alloc hook. > Obj_cgroup is charged with the size of the object and the size of > metadata: as now it's the size of an

[PATCH v7 09/19] mm: memcg/slab: charge individual slab objects instead of pages

2020-06-22 Thread Roman Gushchin
Switch to per-object accounting of non-root slab objects. Charging is performed using obj_cgroup API in the pre_alloc hook. Obj_cgroup is charged with the size of the object and the size of metadata: as now it's the size of an obj_cgroup pointer. If the amount of memory has been charged