From: William Lee Irwin III <wli@holomorphy.com>
To: Andrew Morton <akpm@digeo.com>
Cc: "Randy.Dunlap" <rddunlap@osdl.org>,
colin@colina.demon.co.uk, linux-kernel@vger.kernel.org
Subject: Re: Maximum swap space?
Date: Sat, 7 Jun 2003 13:50:46 -0700 [thread overview]
Message-ID: <20030607205046.GL20413@holomorphy.com> (raw)
In-Reply-To: <20030607132432.26846b8a.akpm@digeo.com>
On Sat, Jun 07, 2003 at 01:24:32PM -0700, Andrew Morton wrote:
> The limit is now 16 swapfiles/devices, because one pte bit got
> stolen for nonlinear VMA pte's.
> I'm not sure where the 2G limit comes from?
i386 has:
#define __swp_type(x) (((x).val >> 1) & 0x1f)
#define __swp_offset(x) ((x).val >> 8)
#define __swp_entry(type, offset) ((swp_entry_t) { ((type) << 1) | ((offse
t) << 8) })
#define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_low })
#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
These limits could be slightly relaxed by the kernel with some slightly
more complex bit twiddlings to recover up to 6 bits of the lower byte
of a non-present PTE for 64 swapfiles. The limitation on size seems to
be in userspace. It appears the kernel has 24 bits for offsets in 4KB
units, for up to something approaching 64GB swapfiles. Andi Kleen tells
me newer distributions have fixed the mkswap(8) userspace limitation.
So non-PAE x86 should be able to do 4TB of aggregate swapspace modulo
vmallocspace and/or ZONE_NORMAL exhaustion from swap maps. Also, PAE
should be able to do 64TB of aggregate swapspace (modulo vmallocespace)
since it has an additional 4 bits usage for page offsets. But I didn't
audit intensively, so some silly limits may be lurking in dark corners.
-- wli
next prev parent reply other threads:[~2003-06-07 20:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-07 8:55 Maximum swap space? Colin Paul Adams
2003-06-07 17:50 ` Randy.Dunlap
2003-06-07 20:24 ` Andrew Morton
2003-06-07 20:50 ` William Lee Irwin III [this message]
2003-06-08 0:55 ` William Lee Irwin III
2003-06-08 1:28 ` Andrew Morton
2003-06-08 1:38 ` William Lee Irwin III
2003-06-08 6:31 ` William Lee Irwin III
2003-06-07 21:43 ` H. Peter Anvin
2003-06-07 21:49 ` William Lee Irwin III
2003-06-07 22:18 ` H. Peter Anvin
2003-06-07 22:43 ` William Lee Irwin III
2003-06-07 22:28 ` Rik van Riel
2003-06-10 19:00 ` Randy.Dunlap
2003-06-10 19:29 ` William Lee Irwin III
-- strict thread matches above, loose matches on Subject: below --
2003-06-08 22:51 Andries.Brouwer
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=20030607205046.GL20413@holomorphy.com \
--to=wli@holomorphy.com \
--cc=akpm@digeo.com \
--cc=colin@colina.demon.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=rddunlap@osdl.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