Re: VM in 2.4.7-pre hurts...

Mike Galbraith (mikeg@wen-online.de)
Mon, 9 Jul 2001 11:18:52 +0200 (CEST)


On 9 Jul 2001, Christoph Rohland wrote:

> Hi Mike,
>
> On Mon, 9 Jul 2001, Mike Galbraith wrote:
> > I don't know exactly what is happening, but I do know _who_ is
> > causing the problem I'm seeing.. it's tmpfs. When mounted on /tmp
> > and running X/KDE, the tar [1] will oom my box every time because
> > page_launder trys and always failing to get anything scrubbed after
> > the tar has run for a while. Unmount tmpfs/restart X and do the
> > same tar, and all is well.
> >
> > (it's not locked pages aparantly. I modified page_launder to move
> > those to the active list, and refill_inactive_scan to rotate them to
> > the end of the active list. inactive_dirty list still grows ever
> > larger, filling with 'stuff' that page_launder can't clean until
> > you're totally oom)
>
> Do you have set the size parameter for tmpfs? Else it will grow until
> oom.

No, but that doesn't appear to be the problem. The patchlet below
fixes^Wmakes it work ok without ooming, whether I have swap enabled
or not.

--- mm/shmem.c.org Mon Jul 9 09:03:27 2001
+++ mm/shmem.c Mon Jul 9 09:03:46 2001
@@ -264,8 +264,8 @@
info->swapped++;

spin_unlock(&info->lock);
-out:
set_page_dirty(page);
+out:
UnlockPage(page);
return error;
}

So, did I fix it or just bust it in a convenient manner ;-)

-Mike

Rik. Kswapd should check oom even if there is no inactive shortage,
else you get livelock when you can't scrub instead of kaboom. Maybe
a count of loops before killing things, but IMHO a check is needed.

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