Re: [PATCH] Cgroup: Fix memory accounting scalability in shrink_page_list

2012-07-20 Thread Tim Chen
On Fri, 2012-07-20 at 12:19 +0900, Kamezawa Hiroyuki wrote: > > When I added batching, I didn't touch page-reclaim path because it delays > res_counter_uncharge() and make more threads run into page reclaim. > But, from above score, bactching seems required. > > And because of current design of

Re: [PATCH] Cgroup: Fix memory accounting scalability in shrink_page_list

2012-07-20 Thread Michal Hocko
On Fri 20-07-12 17:12:16, Johannes Weiner wrote: > On Fri, Jul 20, 2012 at 04:38:48PM +0200, Michal Hocko wrote: > > On Fri 20-07-12 16:16:25, Johannes Weiner wrote: > > > On Fri, Jul 20, 2012 at 03:53:29PM +0200, Michal Hocko wrote: > > > > On Thu 19-07-12 16:34:26, Tim Chen wrote: > > > > [...] >

Re: [PATCH] Cgroup: Fix memory accounting scalability in shrink_page_list

2012-07-20 Thread Johannes Weiner
On Fri, Jul 20, 2012 at 04:38:48PM +0200, Michal Hocko wrote: > On Fri 20-07-12 16:16:25, Johannes Weiner wrote: > > On Fri, Jul 20, 2012 at 03:53:29PM +0200, Michal Hocko wrote: > > > On Thu 19-07-12 16:34:26, Tim Chen wrote: > > > [...] > > > > diff --git a/mm/vmscan.c b/mm/vmscan.c > > > > index

Re: [PATCH] Cgroup: Fix memory accounting scalability in shrink_page_list

2012-07-20 Thread Michal Hocko
On Fri 20-07-12 16:16:25, Johannes Weiner wrote: > On Fri, Jul 20, 2012 at 03:53:29PM +0200, Michal Hocko wrote: > > On Thu 19-07-12 16:34:26, Tim Chen wrote: > > [...] > > > diff --git a/mm/vmscan.c b/mm/vmscan.c > > > index 33dc256..aac5672 100644 > > > --- a/mm/vmscan.c > > > +++ b/mm/vmscan.c >

Re: [PATCH] Cgroup: Fix memory accounting scalability in shrink_page_list

2012-07-20 Thread Johannes Weiner
On Fri, Jul 20, 2012 at 03:53:29PM +0200, Michal Hocko wrote: > On Thu 19-07-12 16:34:26, Tim Chen wrote: > [...] > > diff --git a/mm/vmscan.c b/mm/vmscan.c > > index 33dc256..aac5672 100644 > > --- a/mm/vmscan.c > > +++ b/mm/vmscan.c > > @@ -779,6 +779,7 @@ static unsigned long shrink_page_list(st

Re: [PATCH] Cgroup: Fix memory accounting scalability in shrink_page_list

2012-07-20 Thread Michal Hocko
On Thu 19-07-12 16:34:26, Tim Chen wrote: [...] > diff --git a/mm/vmscan.c b/mm/vmscan.c > index 33dc256..aac5672 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -779,6 +779,7 @@ static unsigned long shrink_page_list(struct list_head > *page_list, > > cond_resched(); > > + mem_cg

Re: [PATCH] Cgroup: Fix memory accounting scalability in shrink_page_list

2012-07-20 Thread Kirill A. Shutemov
On Thu, Jul 19, 2012 at 04:34:26PM -0700, Tim Chen wrote: > Hi, > > I noticed in a multi-process parallel files reading benchmark I ran on a > 8 socket machine, throughput slowed down by a factor of 8 when I ran > the benchmark within a cgroup container. I traced the problem to the > following c

Re: [PATCH] Cgroup: Fix memory accounting scalability in shrink_page_list

2012-07-19 Thread Johannes Weiner
On Thu, Jul 19, 2012 at 04:34:26PM -0700, Tim Chen wrote: > Hi, > > I noticed in a multi-process parallel files reading benchmark I ran on a > 8 socket machine, throughput slowed down by a factor of 8 when I ran > the benchmark within a cgroup container. I traced the problem to the > following c

Re: [PATCH] Cgroup: Fix memory accounting scalability in shrink_page_list

2012-07-19 Thread Minchan Kim
On Fri, Jul 20, 2012 at 12:19:20PM +0900, Kamezawa Hiroyuki wrote: > (2012/07/20 8:34), Tim Chen wrote: > >Hi, > > > >I noticed in a multi-process parallel files reading benchmark I ran on a > >8 socket machine, throughput slowed down by a factor of 8 when I ran > >the benchmark within a cgroup co

Re: [PATCH] Cgroup: Fix memory accounting scalability in shrink_page_list

2012-07-19 Thread Kamezawa Hiroyuki
(2012/07/20 8:34), Tim Chen wrote: Hi, I noticed in a multi-process parallel files reading benchmark I ran on a 8 socket machine, throughput slowed down by a factor of 8 when I ran the benchmark within a cgroup container. I traced the problem to the following code path (see below) when we are