From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail138.messagelabs.com (mail138.messagelabs.com [216.82.249.35]) by kanga.kvack.org (Postfix) with SMTP id 34E8A6B01EE for ; Tue, 6 Apr 2010 01:37:00 -0400 (EDT) Date: Tue, 6 Apr 2010 13:36:44 +0800 From: Shaohua Li Subject: Re: [PATCH]vmscan: handle underflow for get_scan_ratio Message-ID: <20100406053644.GA14183@sli10-desk.sh.intel.com> References: <20100331045348.GA3396@sli10-desk.sh.intel.com> <20100331142708.039E.A69D9226@jp.fujitsu.com> <20100331145030.03A1.A69D9226@jp.fujitsu.com> <20100402065052.GA28027@sli10-desk.sh.intel.com> <20100406050325.GA17797@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100406050325.GA17797@localhost> Sender: owner-linux-mm@kvack.org To: "Wu, Fengguang" Cc: KOSAKI Motohiro , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "akpm@linux-foundation.org" List-ID: On Tue, Apr 06, 2010 at 01:03:25PM +0800, Wu, Fengguang wrote: > Shaohua, > > > + scan = zone_nr_lru_pages(zone, sc, l); > > + if (priority) { > > + scan >>= priority; > > + scan = (scan * fraction[file] / denominator[file]); > > Ah, the (scan * fraction[file]) may overflow in 32bit kernel! good catch. will change it to u64. -- 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