Re: 128MB Swap-Space Limit

Stephen C. Tweedie (sct@redhat.com)
Mon, 24 Aug 1998 17:04:47 +0100


Hi,

On Tue, 11 Aug 1998 09:16:13 -0700, Bill Hawes <whawes@transmeta.com>
said:

> Alan Cox wrote:
>> Stephen Tweedie did, and also fixed the horrible horrible vm bug in the
>> current 2.1.x where any user can create 128 mappings of a page and it
>> leaks.

> Please note that the current swap count tracking does not leak the
> page when the count overflows. The count is reclaimed when the swap is
> turned off for that file, and the clever sysadmin has several swap
> files so that he can easily reclaim at any time.

That counts as a leak in my books. Where do we document the
requirement that to avoid swap leaks you have to rotate your swap
partitions? Sounds like a bug to me.

Bill, we were hitting this bug regularly in 2.0, and that bug only hit
with a refcount of 256 on a swap entry. We now fail at 127, and take a
swap leak at that time which can only be resolved by swapoff. If the
problem was visible in 2.0, it's going to be really bad in 2.2 with
failure at half that number of processes. It's also a silent failure
(after the initial 5 warnings).

> It was a horrible vm bug before I added the code to keep the counts
> from wrapping around completely; now it's merely an unsightly wart
> that might show up from time to time.

It will leak left, right and center on a busy sendmail or apache
system. I've ungraded the count from char to short in 2.1.117, so we
should be OK now.

--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.altern.org/andrebalsa/doc/lkml-faq.html