From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx153.postini.com [74.125.245.153]) by kanga.kvack.org (Postfix) with SMTP id 978F76B0071 for ; Wed, 27 Jun 2012 15:48:44 -0400 (EDT) Received: by dakp5 with SMTP id p5so2236319dak.14 for ; Wed, 27 Jun 2012 12:48:43 -0700 (PDT) Date: Wed, 27 Jun 2012 12:48:41 -0700 (PDT) From: David Rientjes Subject: Re: [PATCH 02/11] memcg: Reclaim when more than one page needed. In-Reply-To: <4FEADA55.4060409@parallels.com> Message-ID: References: <1340633728-12785-1-git-send-email-glommer@parallels.com> <1340633728-12785-3-git-send-email-glommer@parallels.com> <4FEADA55.4060409@parallels.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Glauber Costa Cc: cgroups@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , linux-kernel@vger.kernel.org, Frederic Weisbecker , Pekka Enberg , Michal Hocko , Johannes Weiner , Christoph Lameter , devel@openvz.org, kamezawa.hiroyu@jp.fujitsu.com, Tejun Heo , Suleiman Souhlal On Wed, 27 Jun 2012, Glauber Costa wrote: > > @@ -2206,7 +2214,7 @@ static int mem_cgroup_do_charge(struct mem_cgroup > > *memcg, gfp_t gfp_mask, > > > * unlikely to succeed so close to the limit, and we fall back > > > * to regular pages anyway in case of failure. > > > */ > > > - if (nr_pages == 1 && ret) > > > + if (nr_pages <= NR_PAGES_TO_RETRY && ret) > > > return CHARGE_RETRY; > > Changed to costly order. > 1 << PAGE_ALLOC_COSTLY_ORDER was the suggestion. > One more thing. The original version of this patch included > a cond_resched() here, that was also removed. From my re-reading > of the code in page_alloc.c and vmscan.c now, I tend to think > this is indeed not needed, since any cond_resched()s that might > be needed to ensure the safety of the code will be properly > inserted by the reclaim code itself, so there is no need for us > to include any when we signal that a retry is needed. > For __GFP_WAIT, that sounds like a safe guarantee. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org