Re: [PATCH 2/12] mm: let swap use exceptional entries
From: Hugh Dickins
Date: Tue Jul 12 2011 - 18:36:01 EST
On Sat, 18 Jun 2011, Andrew Morton wrote:
> On Tue, 14 Jun 2011 03:43:47 -0700 (PDT) Hugh Dickins <hughd@xxxxxxxxxx> wrote:
>
> > In an i386 kernel this limits its information (type and page offset)
> > to 30 bits: given 32 "types" of swapfile and 4kB pagesize, that's
> > a maximum swapfile size of 128GB. Which is less than the 512GB we
> > previously allowed with X86_PAE (where the swap entry can occupy the
> > entire upper 32 bits of a pte_t), but not a new limitation on 32-bit
> > without PAE; and there's not a new limitation on 64-bit (where swap
> > filesize is already limited to 16TB by a 32-bit page offset).
>
> hm.
>
> > Thirty
> > areas of 128GB is probably still enough swap for a 64GB 32-bit machine.
>
> What if it was only one area? 128GB is close enough to 64GB (or, more
> realistically, 32GB) to be significant. For the people out there who
> are using a single 200GB swap partition and actually needed that much,
> what happens? swapon fails?
No, it doesn't fail: it just trims back the amount of swap that is used
(and counted) to the maximum that the running kernel supports (just like
when you switch between 64bit and 32bit-PAE and 32bit-nonPAE kernels
using the same large swap device, the 64bit being able to access more
of it than the 32bit-PAE kernel, and that more than the 32bit-nonPAE).
I'd grown to think that the users of large amounts of RAM may like to
have a little swap for leeway, but live in dread of the slow death that a
large amount of swap can result in. Maybe that's just one class of user.
I'd worry more about this if it were a new limitation for 64bit; but it's
just a lower limitation for the 32bit-PAE case. If it actually proves
to be an issue (and we abandon our usual mantra to go to 64bit), then I
don't think having 32 distinct areas is sacrosanct: we can (configurably
or tunably) lower the number of areas and increase their size; but I
doubt we shall need to bother.
ARM is getting LPAE? Then I guess this is a good moment to enforce
the new limit.
Hugh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/