Re: [PATCH] writeback: sum memcg dirty counters as needed

2019-03-29 Thread Greg Thelen
Johannes Weiner wrote: > On Thu, Mar 07, 2019 at 08:56:32AM -0800, Greg Thelen wrote: >> --- a/mm/memcontrol.c >> +++ b/mm/memcontrol.c >> @@ -3880,6 +3880,7 @@ struct wb_domain *mem_cgroup_wb_domain(struct >> bdi_writeback *wb) >> * @pheadroom: out parameter for number of allocatable pages

Re: [PATCH] writeback: sum memcg dirty counters as needed

2019-03-29 Thread Greg Thelen
Andrew Morton wrote: > On Thu, 7 Mar 2019 08:56:32 -0800 Greg Thelen wrote: > >> Since commit a983b5ebee57 ("mm: memcontrol: fix excessive complexity in >> memory.stat reporting") memcg dirty and writeback counters are managed >> as: >> 1) per-memcg per-cpu values in range of [-32..32] >> 2)

Re: [PATCH] writeback: sum memcg dirty counters as needed

2019-03-28 Thread Johannes Weiner
On Thu, Mar 07, 2019 at 08:56:32AM -0800, Greg Thelen wrote: > --- a/mm/memcontrol.c > +++ b/mm/memcontrol.c > @@ -3880,6 +3880,7 @@ struct wb_domain *mem_cgroup_wb_domain(struct > bdi_writeback *wb) > * @pheadroom: out parameter for number of allocatable pages according to > memcg > *

Re: [PATCH] writeback: sum memcg dirty counters as needed

2019-03-28 Thread Johannes Weiner
On Wed, Mar 27, 2019 at 03:29:47PM -0700, Greg Thelen wrote: > On Fri, Mar 22, 2019 at 11:15 AM Roman Gushchin wrote: > > On Thu, Mar 07, 2019 at 08:56:32AM -0800, Greg Thelen wrote: > > > + int cpu; > > > + > > > + for_each_online_cpu(cpu) > > > + x +=

Re: [PATCH] writeback: sum memcg dirty counters as needed

2019-03-27 Thread Greg Thelen
On Fri, Mar 22, 2019 at 11:15 AM Roman Gushchin wrote: > > On Thu, Mar 07, 2019 at 08:56:32AM -0800, Greg Thelen wrote: > > Since commit a983b5ebee57 ("mm: memcontrol: fix excessive complexity in > > memory.stat reporting") memcg dirty and writeback counters are managed > > as: > > 1) per-memcg

Re: [PATCH] writeback: sum memcg dirty counters as needed

2019-03-22 Thread Roman Gushchin
On Thu, Mar 07, 2019 at 08:56:32AM -0800, Greg Thelen wrote: > Since commit a983b5ebee57 ("mm: memcontrol: fix excessive complexity in > memory.stat reporting") memcg dirty and writeback counters are managed > as: > 1) per-memcg per-cpu values in range of [-32..32] > 2) per-memcg atomic counter >

Re: [PATCH] writeback: sum memcg dirty counters as needed

2019-03-21 Thread Andrew Morton
On Thu, 7 Mar 2019 08:56:32 -0800 Greg Thelen wrote: > Since commit a983b5ebee57 ("mm: memcontrol: fix excessive complexity in > memory.stat reporting") memcg dirty and writeback counters are managed > as: > 1) per-memcg per-cpu values in range of [-32..32] > 2) per-memcg atomic counter > When

[PATCH] writeback: sum memcg dirty counters as needed

2019-03-07 Thread Greg Thelen
Since commit a983b5ebee57 ("mm: memcontrol: fix excessive complexity in memory.stat reporting") memcg dirty and writeback counters are managed as: 1) per-memcg per-cpu values in range of [-32..32] 2) per-memcg atomic counter When a per-cpu counter cannot fit in [-32..32] it's flushed to the