From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail137.messagelabs.com (mail137.messagelabs.com [216.82.249.19]) by kanga.kvack.org (Postfix) with SMTP id CE5D56B004F for ; Sun, 5 Jul 2009 14:24:54 -0400 (EDT) Received: by rv-out-0708.google.com with SMTP id l33so859845rvb.26 for ; Sun, 05 Jul 2009 02:55:27 -0700 (PDT) Date: Sun, 5 Jul 2009 17:55:21 +0800 From: Wu Fengguang Subject: Re: Found the commit that causes the OOMs Message-ID: <20090705095520.GA31587@localhost> References: <20090701021645.GA6356@localhost> <20090701022644.GA7510@localhost> <20090701114959.85D3.A69D9226@jp.fujitsu.com> <4A4AD07E.2040508@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A4AD07E.2040508@redhat.com> Sender: owner-linux-mm@kvack.org To: Rik van Riel Cc: KOSAKI Motohiro , David Woodhouse , David Howells , Minchan Kim , Mel Gorman , Johannes Weiner , Andrew Morton , LKML , Christoph Lameter , "peterz@infradead.org" , "tytso@mit.edu" , "linux-mm@kvack.org" , "elladan@eskimo.com" , "npiggin@suse.de" , "Barnes, Jesse" List-ID: On Tue, Jun 30, 2009 at 10:57:02PM -0400, Rik van Riel wrote: > KOSAKI Motohiro wrote: > >>> [ 1522.019259] Active_anon:11 active_file:6 inactive_anon:0 >>> [ 1522.019260] inactive_file:0 unevictable:0 dirty:0 writeback:0 unstable:0 >>> [ 1522.019261] free:1985 slab:44399 mapped:132 pagetables:61830 bounce:0 >>> [ 1522.019262] isolate:69817 >> >> OK. thanks. >> I plan to submit this patch after small more tests. it is useful for OOM analysis. > > It is also useful for throttling page reclaim. > > If more than half of the inactive pages in a zone are > isolated, we are probably beyond the point where adding > additional reclaim processes will do more harm than good. Maybe we can try limiting the isolation phase of direct reclaims to one per CPU? mutex_lock(per_cpu_lock); isolate_pages(); shrink_page_list(); put_back_pages(); mutex_unlock(per_cpu_lock); This way the isolated pages as well as major parts of direct reclaims will be bounded by CPU numbers. The added overheads should be trivial comparing to the reclaim costs. Thanks, Fengguang -- 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