Linux PARISC architecture development
 help / color / mirror / Atom feed
From: John Marvin <jsm@udlkern.fc.hp.com>
To: parisc-linux@lists.parisc-linux.org
Subject: [parisc-linux] Swap space limitions for Linux on parisc
Date: Fri, 8 Mar 2002 18:27:34 -0700 (MST)	[thread overview]
Message-ID: <200203090127.SAA05161@udlkern.fc.hp.com> (raw)

> Forget about swapping over NFS.  It's prone to deadlock under
> stress.  I think we support 2GB/file and up to 8 files, but I may be
> underestimating... John would know.

For a 32 bit kernel:
    128 Gb per file, up to 32 files for a total of 4 Tb.

However, there are two limitations that you have to work around to get that:

    1) mkswap was never modified for parisc, so I believe it sets a limit
    of 2 Gb.  I once hacked a version of it, but I never got around to
    submitting the change, because I had some questions about some
    comments in the code that I believed were out of date, but wasn't sure,
    put it on the backburner, and dropped the ball.

    Anyway, I believe the change was simple, and I tested at least a 16 Gb
    swap partition at one time.

    2) Although we can support 32 swap files, Linux currently has a limit
    of 8. However, I think the only change to allow 32 is to change
    MAX_SWAPFILES in include/linux/swap.h to 32. I don't think there are
    any other intrinsic limitations there.

    3) Note that a swap map is allocated for each swap file.  The swap map
    takes 2 bytes for each page of swap.  This swap map is vmalloc'd, so
    that places another limitation on the total swap size.  The vmalloc
    address space starts after the end of physical memory, so the more
    physical memory you add, the LESS swap space you can have.  But that
    isn't likely to become an issue until you need more than a terabyte of
    swap space.

For a 64 bit kernel the size of a swap partition can be even larger than
128 Gb.  But I really can't say how much larger, because there are a bunch
of variables that get involved and I don't have the time to try to muddle
through them all. Some of those variables:

    1) Disk size limits / Disk addressing limits
    2) swap partition format limits
    3) physical memory limits (limits size of all swap maps)
    4) vmalloc address space limits (limits size of all swap maps)

Note that I didn't mention the SWP_OFFSET limit, which is the main limitation
for the 32 bit kernel. For a 32 bit kernel we dedicate 25 bits to swap
offset, which gives us the 128 Gb limit (2^25 x 4K page size). For a 64
bit kernel we have 57 bits, so that is not the limiting factor. One of
the above will set the limit.

John

P.S. Note that we don't support 64 bit user space processes yet, so you
would probably find it difficult to consume extreme amounts of swap
space, since each process can only address ~4Gb of memory.

             reply	other threads:[~2002-03-09  1:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-09  1:27 John Marvin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-03-09  2:38 [parisc-linux] Swap space limitions for Linux on parisc Duraid Madina
2002-03-09  2:45 ` Randolph Chung
2002-03-09  3:00   ` Duraid Madina
2002-03-09  3:05     ` Matthew Wilcox
2002-03-09  3:23       ` Duraid Madina
2002-03-09  5:34 John Marvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200203090127.SAA05161@udlkern.fc.hp.com \
    --to=jsm@udlkern.fc.hp.com \
    --cc=parisc-linux@lists.parisc-linux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox