Thread (17 messages) 17 messages, 3 authors, 2004-08-06

Re: [PATCH] 1/4: rework alloc_pages

From: Rik van Riel <hidden>
Date: 2004-08-06 12:01:43

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: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help