Re: VM in v2.4.0test9

From: Rik van Riel (riel@conectiva.com.br)
Date: Mon Oct 09 2000 - 12:59:05 EST


On Sun, 8 Oct 2000, Linus Torvalds wrote:
> On Wed, 4 Oct 2000, Rik van Riel wrote:
> >
> > The potential for this bug has been around since 2.3.51, when
> > different balance_ratios for different zones became possible.

> You must NOT depend on some global "freepages" thing.

> Don't do this patch. Fix it for real instead. You can use the
> global amount of free memory for heuristics, but you MUST NOT
> use it for deciding to not page stuff out etc - because you will
> _always_ end up with cases where you decide that you globally
> have enough memory even though locally there is a memory
> shortage (or the other way around - you end up thinking that
> there is a global memory shortage even if all local memories are
> plenty fine, so you end up trying to swap stuff out when it
> shouldn't be done).

Please read mm/vmscan.c::free_shortage()

The code honours /both/ global and local shortages.

(but indeed, we shouldn't - and in retrospect don't - depend
on global values and can make /proc/sys/vm/freepages writable
again so the sysadmin can give a balancing hint on how many
free pages to keep around ... which may be important for folks
doing gigabit routing)

regards,

Rik

--
"What you're running that piece of shit Gnome?!?!"
       -- Miguel de Icaza, UKUUG 2000

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.kernel.org Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Oct 15 2000 - 21:00:12 EST