From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 6 Aug 2004 08:01:43 -0400 (EDT) From: Rik van Riel Subject: Re: [PATCH] 1/4: rework alloc_pages In-Reply-To: <41131FA6.4070402@yahoo.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Nick Piggin Cc: Andrew Morton , linux-mm@kvack.org List-ID: On Fri, 6 Aug 2004, Nick Piggin wrote: > for_each_zone(z) { > if (z->free_pages < z->pages_low + z->protection) > continue; > else > goto got_pg; > } > > for_each_zone(z) > wakeup_kswapd(z); Note that since kswapd does NOT take z->protection into account, you could end up doing too much asynchronous page recycling from the highmem zone while having stale pages sitting around in the normal zone. As long as we have the lowmem protection switched off by default we should be fine, though. Either that, or wakeup_kswapd should tell kswapd what the threshold is ... -- "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian W. Kernighan -- 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: aart@kvack.org