Re: patch cow-swapin [was Re: Very bad swap bug -- 2.0, 2.1 at least]

Stephen C. Tweedie (sct@redhat.com)
Mon, 28 Sep 1998 10:36:50 +0100


Hi,

On Sat, 26 Sep 1998 19:46:53 +0200 (CEST), Andrea Arcangeli
<andrea@e-mind.com> said:

> Please Alan be _sure_ to not apply my swapin-parent patch to 2.0.36
> because I had a problem now (it not crashed but I' ve seen some not happy
> prink and I rebooted istanteneously with 35 because it' s production
> machine...).

Which printks, exactly?

There is a problem with your patch: you effectively fault the parent
process without taking the mm->mmap_sem lock. Currently, the only code
which is allowed to do that is the swapout code. I'm not entirely sure
what the consequences are of doing a swapin without that lock, but I'm
certain I don't want to risk changing that invariant for 2.0.

> Stephen, do you think that I am wasting time fixing the swapin-parent
> code for 2.0? It would be better to backport the new cache code? Or
> all you like to live with the ugly swapin but sure safe?

I'm sure I don't want to see new mm code in 2.0. I might be willing to
see the swap cache stuff back-ported, because on its own the swap cache
patches are relatively self-contained, do not change performance in
other ways, and are pretty well tested by now.

I'd still prefer to stay on the safe side and not make any such changes
at all to 2.0. However, this can be a major performance problem in
certain situations, and it would be nice to have it cleared up.

--Stephen

-
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/