From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Chinner Subject: Re: [PATCH v2 2/2] vmscan: take at least one pass with shrinkers Date: Sun, 23 Dec 2012 10:53:40 +1100 Message-ID: <20121222235340.GI15182@dastard> References: <1356086810-6950-1-git-send-email-glommer@parallels.com> <1356086810-6950-3-git-send-email-glommer@parallels.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org, Mel Gorman , Johannes Weiner , Michal Hocko , kamezawa.hiroyu@jp.fujitsu.com, Theodore Ts'o , Al Viro To: Glauber Costa Return-path: Received: from ipmail06.adl6.internode.on.net ([150.101.137.145]:38701 "EHLO ipmail06.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752039Ab2LVXyJ (ORCPT ); Sat, 22 Dec 2012 18:54:09 -0500 Content-Disposition: inline In-Reply-To: <1356086810-6950-3-git-send-email-glommer@parallels.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Dec 21, 2012 at 02:46:50PM +0400, Glauber Costa wrote: > In very low free kernel memory situations, it may be the case that we > have less objects to free than our initial batch size. If this is the > case, it is better to shrink those, and open space for the new workload > then to keep them and fail the new allocations. > > More specifically, this happens because we encode this in a loop with > the condition: "while (total_scan >= batch_size)". So if we are in such > a case, we'll not even enter the loop. > > This patch modifies turns it into a do () while {} loop, that will > guarantee that we scan it at least once, while keeping the behaviour > exactly the same for the cases in which total_scan > batch_size. > > Signed-off-by: Glauber Costa > Acked-by: Dave Chinner I think you'll find I said: Reviewed-by: Dave Chinner That has a significantly different meaning to Acked-by, so you should be careful to correctly transcribe tags back to the patches... Cheers, Dave. -- Dave Chinner david@fromorbit.com