[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Why should there be a limitation for sawp partition as 128MB max



Oommen Thomas proclaimed:
> On Mon, 7 Feb 2000, kamesh jayachandran wrote:
> AFAIK, the limitation is that a single partition if it is more than 112.5
> MB or so, the rest is ignored. You can have multiple partitions that way.

Newer versions of mkswap handle swap spaces bigger than 128M.

>From the mkswap man page:

       Linux knows about two styles of swap areas, old style  and
       new  style.   The  last  10 bytes of the first page of the
       swap area distinguishes them: old style has  `SWAP_SPACE',
       new style has `SWAPSPACE2' as signature.

       In  the  old  style, the rest of this first page was a bit
       map, with a 1 bit for each usable page of the  swap  area.
       Since  the first page holds this bit map, the first bit is
       0.  Also, the last 10 bytes hold the signature. So, if the
       page  size  is  S,  an old style swap area can describe at
       most 8*(S-10)-1 pages used for swapping.  With S=4096  (as
       on  i386),  the  useful  area  is  at most 133890048 bytes
       (almost 128 MB if you believe in 1 MB=2^20 bytes), and the
       rest is wasted.  On an alpha and sparc64, with S=8192, the
       useful area is at most 535560992 bytes (almost 512 MB with
       the same proviso).

       The  old  setup  wastes  most of this bitmap page, because
       zero bits denote bad blocks or blocks past the end of  the
       swap  space, and a simple integer suffices to indicate the
       size of the swap space, while the bad blocks, if any,  can
       simply  be  listed.  Nobody wants to use a swap space with
       hundreds of bad blocks. (I would not even use a swap space
       with  1  bad  block.)   In the new style swap area this is
       precisely what is done.  The maximum useful size of a swap
       area  now  depends on the architecture.  It is roughly 2GB
       on i386, PPC, m68k, ARM, 1GB  on  sparc,  512MB  on  mips,
       128GB on alpha and 3TB on sparc64.


Thaths
-- 
"See that ship over there?  They're broadcasting Major League Baseball
       with implied oral conesnt, not express written conesent."
                     -- Homer J. Simpson
Sudhakar C13n http://people.netscape.com/thaths/ Lead Indentured Slave
---
Send e-mail to 'ilugc-request@xxxxxxxxxxxxxxxxxx' with 'unsubscribe' 
in either the subject or the body to unsubscribe from this list.