From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail144.messagelabs.com (mail144.messagelabs.com [216.82.254.51]) by kanga.kvack.org (Postfix) with SMTP id DABC05F0040 for ; Thu, 21 Oct 2010 16:03:37 -0400 (EDT) Date: Thu, 21 Oct 2010 15:03:32 -0500 (CDT) From: Christoph Lameter Subject: Re: vmscan: Do not run shrinkers for zones other than ZONE_NORMAL In-Reply-To: <20101021124054.14b85e50.akpm@linux-foundation.org> Message-ID: References: <20101021124054.14b85e50.akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org To: Andrew Morton Cc: npiggin@kernel.dk, Pekka Enberg , David Rientjes , linux-mm@kvack.org, Andi Kleen List-ID: On Thu, 21 Oct 2010, Andrew Morton wrote: > The patch doesn't patch direct reclaim, in do_try_to_free_pages(). How > come? Direct reclaim does not run node specific shrink_slab. Direct reclaim does a general pass after the individual zones have been shrunk. > OK, maybe this. Suppose we have a machine with 800M lowmem and 200M > highmem. And suppose the lowmem region is stuffed full of clean > icache/dcache. A __GFP_HIGHMEM allocation should put pressure on > lowmem to get some of those pages back. What we don't want to do is to > keep on reclaiming the highmem zone and allocating pages from there, > because the machine would effectively end up with only 200M available > for pagecache. Shrinker reclaim is not zone specific. It either occurs on a node or on the system as a whole. A failure of HIGHMEM allocation in the direct reclaim path will result in shrinkers being called with NO_NUMA_NODE and therefore global reclaim will take place everywhere. Per node reclaim occurs from kswapd and covers all zones of that node. > Please convince us that your patch doesn't screw up zone balancing? There are no slab allocations in HIGHMEM or MOVABLE. Nothing to balance there. That reminds me: We also have counters on how many slabs exist in a given zone these days. We could check for zero there and just not run the shrinkers if zero. We could also use those counters to guide shrink_slab in a better way. -- 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