From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 14 Feb 2007 14:49:49 -0800 (PST) From: Christoph Lameter Subject: Re: Use ZVC counters to establish exact size of dirtyable pages In-Reply-To: Message-ID: References: <20070213000411.a6d76e0c.akpm@linux-foundation.org> <20070214142432.a7e913fa.akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Andrew Morton Cc: linux-mm@kvack.org List-ID: On Wed, 14 Feb 2007, Christoph Lameter wrote: > > This function will return zero. Which I think we'll happen to handle OK. > > One would expect the function to return 10. The 10 pages are on the LRU. > If we really have zero dirtyable pages then we will get a division by > zero problem. Well we do not have the division by zero problem due to this expression that really should also use available_memory unmapped_ratio = 100 - ((global_page_state(NR_FILE_MAPPED) + global_page_state(NR_ANON_PAGES)) * 100) / vm_total_pages; If we would change the basis here too (which is probably a good thing to do) then we may have the division by zero issue. -- 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