From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail143.messagelabs.com (mail143.messagelabs.com [216.82.254.35]) by kanga.kvack.org (Postfix) with ESMTP id 0E22D900138 for ; Fri, 12 Aug 2011 09:33:55 -0400 (EDT) Date: Fri, 12 Aug 2011 15:33:52 +0200 From: Michal Hocko Subject: Re: [patch 2/2] mm: vmscan: drop nr_force_scan[] from get_scan_count Message-ID: <20110812133352.GD32335@tiehlicka.suse.cz> References: <1313094715-31187-1-git-send-email-jweiner@redhat.com> <1313094715-31187-2-git-send-email-jweiner@redhat.com> <20110812065858.GA6916@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110812065858.GA6916@redhat.com> Sender: owner-linux-mm@kvack.org List-ID: To: Johannes Weiner Cc: Minchan Kim , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, KAMEZAWA Hiroyuki , Ying Han , Balbir Singh , KOSAKI Motohiro , Daisuke Nishimura , Mel Gorman On Fri 12-08-11 08:58:58, Johannes Weiner wrote: [...] > From: Johannes Weiner > Subject: [patch] mm: vmscan: drop nr_force_scan[] from get_scan_count > > The nr_force_scan[] tuple holds the effective scan numbers for anon > and file pages in case the situation called for a forced scan and the > regularly calculated scan numbers turned out zero. > > However, the effective scan number can always be assumed to be > SWAP_CLUSTER_MAX right before the division into anon and file. The > numerators and denominator are properly set up for all cases, be it > force scan for just file, just anon, or both, to do the right thing. > > Signed-off-by: Johannes Weiner Nice. The code is much easier to read. Reviewed-by: Michal Hocko -- Michal Hocko SUSE Labs SUSE LINUX s.r.o. Lihovarska 1060/12 190 00 Praha 9 Czech Republic -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org