lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1342802298.13492.59.camel@schen9-DESK>
Date:	Fri, 20 Jul 2012 09:38:18 -0700
From:	Tim Chen <tim.c.chen@...ux.intel.com>
To:	Kamezawa Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Mel Gorman <mel@....ul.ie>, Minchan Kim <minchan@...nel.org>,
	Johannes Weiner <hannes@...xchg.org>,
	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	Andi Kleen <ak@...ux.intel.com>, linux-mm <linux-mm@...ck.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Cgroup: Fix memory accounting scalability in
 shrink_page_list

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 per-zone-per-memcg-LRU, batching
> works very very well....all lru pages shrink_page_list() scans are on
> the same memcg.
> 
> BTW, it's better to show 'how much improved' in patch description..

I didn't put the specific improvement in patch description as the
performance change is specific to my machine and benchmark and
improvement could be variable for others.  However, I did include the
specific number in the body of my message.  Hope that is enough.
 

> 
> 
> > ---
> > Signed-off-by: Tim Chen <tim.c.chen@...ux.intel.com>
> > 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_cgroup_uncharge_start();
> >   	while (!list_empty(page_list)) {
> >   		enum page_references references;
> >   		struct address_space *mapping;
> > @@ -1026,6 +1027,7 @@ keep_lumpy:
> >
> >   	list_splice(&ret_pages, page_list);
> >   	count_vm_events(PGACTIVATE, pgactivate);
> > +	mem_cgroup_uncharge_end();
> 
> I guess placing mem_cgroup_uncharge_end() just after the loop may be better looking.

I initially though of doing that.  I later pushed the statement down to
after list_splice(&ret_pages, page_list) as that's when the page reclaim
is actually completed.  It probably doesn't matter one way or the other.
I can move it to just after the loop if people think that's better.

Thanks for reviewing the change.

Tim

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ