Re: Why 128Mb swap? (Re: Booting to >8GB...)

From: Khimenko Victor (khim@sch57.msk.ru)
Date: Sat Apr 29 2000 - 17:17:03 EST


In <Pine.LNX.4.10.10004292042110.27965-100000@infradead.org> Riley Williams (rhw@MemAlpha.CX) wrote:
RW> Hi Khimenko.

>>>> 1. /dev/hda1 is a Linux Swap partition of just under 128M
>>>> (not more than 130,950 blocks) in size, starting at
>>>> cylinder 1.

>>> Just a question, but why the 128M limit? That's not the limit on
>>> memory, so it's not about page allocation. I would gladly create
>>> 1*1Gb swap partition, rather than 8*128Mb.

>> Long time ago first page of swap contained signature 10 bytes
>> long in the end of first page and the rest of that page was
>> devoted to bit map (bit 1 == page usable, bit 0 == page
>> unusable). First page was thus unavailable as well (there is bit
>> map and signature) maxsize=4096*((4096-10)*8-1)=133885952 bytes

>> Now (with kernel 2.2 and up) limit is raised to 2146791424
>> bytes...

RW> Precicely how is that limit reached?

Hmm. God knows :-( From where I got this number ??? Of course it should be
2147475456 bytes (2GiB-2pages).

RW> It's not a straight 2^31 as that's 2,147,483,648 or about 1M larger than
RW> the figure you quote.

Correct :-/

>> ...so I REALLY see no reason to use 8*128MiB swap partitions...

RW> If it has indeed been upped like that, neither do I...

>> Perhaps Riley still can not forget about 2.0 compatibility...

RW> To be more accurate, I didn't even know that limit had been raised.
RW> When (ie, which kernel) was that done?

2.2.1xx (2.2.127? not remember exact number). At least I always used 500-900MiB
swap partitions with all my 2.2.x systems right from the beginning...

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



This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:17 EST