Re: [PATCH v2 4/6] mm: unify SLAB and SLUB page accounting

2019-04-24 Thread Roman Gushchin
On Wed, Apr 24, 2019 at 12:40:59PM -0700, Shakeel Butt wrote: > On Wed, Apr 24, 2019 at 12:17 PM Roman Gushchin wrote: > > > > On Wed, Apr 24, 2019 at 10:23:45AM -0700, Shakeel Butt wrote: > > > Hi Roman, > > > > > > On Tue, Apr 23, 2019 at 9:30 PM Roman Gushchin wrote: > > > > > > > > Currently

Re: [PATCH v2 4/6] mm: unify SLAB and SLUB page accounting

2019-04-24 Thread Shakeel Butt
On Wed, Apr 24, 2019 at 12:17 PM Roman Gushchin wrote: > > On Wed, Apr 24, 2019 at 10:23:45AM -0700, Shakeel Butt wrote: > > Hi Roman, > > > > On Tue, Apr 23, 2019 at 9:30 PM Roman Gushchin wrote: > > > > > > Currently the page accounting code is duplicated in SLAB and SLUB > > > internals.

Re: [PATCH v2 4/6] mm: unify SLAB and SLUB page accounting

2019-04-24 Thread Roman Gushchin
On Wed, Apr 24, 2019 at 10:23:45AM -0700, Shakeel Butt wrote: > Hi Roman, > > On Tue, Apr 23, 2019 at 9:30 PM Roman Gushchin wrote: > > > > Currently the page accounting code is duplicated in SLAB and SLUB > > internals. Let's move it into new (un)charge_slab_page helpers > > in the

Re: [PATCH v2 4/6] mm: unify SLAB and SLUB page accounting

2019-04-24 Thread Shakeel Butt
Hi Roman, On Tue, Apr 23, 2019 at 9:30 PM Roman Gushchin wrote: > > Currently the page accounting code is duplicated in SLAB and SLUB > internals. Let's move it into new (un)charge_slab_page helpers > in the slab_common.c file. These helpers will be responsible > for statistics (global and

[PATCH v2 4/6] mm: unify SLAB and SLUB page accounting

2019-04-23 Thread Roman Gushchin
Currently the page accounting code is duplicated in SLAB and SLUB internals. Let's move it into new (un)charge_slab_page helpers in the slab_common.c file. These helpers will be responsible for statistics (global and memcg-aware) and memcg charging. So they are replacing direct