Re: ~500 megs cached yet 2.6.5 goes into swap hell

From: Hugh Dickins
Date: Fri May 07 2004 - 15:08:12 EST


On Fri, 7 May 2004, Timothy Miller wrote:
> >
> >>>Perhaps what we really want is "swap_back_in" script? That way you
> >>>could do "updatedb; swap_back_in" in cron and be happy.
> >>
> >>swapoff -a; swapon -a
>
> Wouldn't this also be a problem if you are using more memory than you
> have physical RAM?

On 2.4 it certainly would be a problem (hang with others OOM-killed).

On 2.6 it shouldn't be a problem: the swapoff may fail upfront if
there's way too little memory, or it may get itself OOM-killed if
it runs out on the way, but it ought not to upset other tasks.

But of course, Pavel is right that it does nothing for file backed.

Hugh

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