Re: pre8: where has the anti-hog code gone?

From: Rik van Riel (riel@conectiva.com.br)
Date: Sun May 14 2000 - 07:01:08 EST


On Sun, 14 May 2000, Ingo Molnar wrote:

> this seems to have done the trick here - no more NULL gfps. Any
> better generic suggestion than the explicit 'page transport'
> path between freeing and allocation points?

Mark the zone as a "steal-before-allocate" zone while
one user process is in the page stealer because it
could not find an easy page.

if (couldn't find an easy page) {
        atomic_inc(&zone->steal_before_allocate);
        try_to_free_pages();
        blah blah blah;
        atomic_dec(&zone->steal_before_allocate);
}

And the allocation path can be changed to always call
try_to_free_pages() if zone->steal_before_allocate is
set.

This way we won't just guarantee that we can keep the page
we just freed, but also that _other_ processes won't get
false hopes and/or run out of memory. Furthermore, by going
into try_to_free_pages() a bit more agressively we could
reduce memory fragmentation a bit (but I'm not sure if this
effect would be significant or not).

Rik

--
The Internet is not a network of computers. It is a network
of people. That is its real strength.

Wanna talk about the kernel? irc.openprojects.net / #kernelnewbies http://www.conectiva.com/ http://www.surriel.com/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:24 EST