This is the mail archive of the
mailing list for the GDB project.
Re: PAGE_SIZE Availability Inconsistency
- From: "H. Peter Anvin" <hpa at zytor dot com>
- To: Anton Blanchard <anton at samba dot org>
- Cc: Christoph Hellwig <hch at infradead dot org>, Arjan van de Ven <arjan at infradead dot org>, Roman Zippel <zippel at linux-m68k dot org>, David Brown <dmlb2000 at gmail dot com>, Linux Kernel Mailing List <linux-kernel at vger dot kernel dot org>, gdb at sourceware dot org
- Date: Thu, 08 Mar 2007 10:04:48 -0800
- Subject: Re: PAGE_SIZE Availability Inconsistency
- References: <firstname.lastname@example.org> <20070306092917.GA5226@infradead.org> <email@example.com> <20070308090031.GB7373@infradead.org> <firstname.lastname@example.org> <20070308160852.GB9916@infradead.org> <45F0426C.email@example.com> <20070308175729.GA7054@kryten>
Anton Blanchard wrote:
By the way, it's a massive snafu that the swap area magic number is
dependent on PAGE_SIZE. There is absolutely no good reason for that.
Agreed, its been a big problem booting between 4kB and 64kB kernels on
The easiest way to fix this would be to always park the swap magic at
the offset of the smallest page size in use, which is 4K. This is
analogous how the offset for the ext2/3 superblock got fixed at 1K --
for 1K blocks, it's the second block, but for larger blocks, it's part
of the first block. If we fix the offset of the swap magic at 4096
minus the offset that's already there, it will always fall in the first
page regardless of page size.