From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 697 invoked by alias); 8 Mar 2007 18:06:33 -0000 Received: (qmail 688 invoked by uid 22791); 8 Mar 2007 18:06:32 -0000 X-Spam-Check-By: sourceware.org Received: from terminus.zytor.com (HELO terminus.zytor.com) (192.83.249.54) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 08 Mar 2007 18:06:25 +0000 Received: from [172.27.0.16] (c-67-180-238-27.hsd1.ca.comcast.net [67.180.238.27]) (authenticated bits=0) by terminus.zytor.com (8.13.8/8.13.7) with ESMTP id l28I4mkU011248 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 8 Mar 2007 10:04:49 -0800 Message-ID: <45F05040.4090602@zytor.com> Date: Thu, 08 Mar 2007 18:06:00 -0000 From: "H. Peter Anvin" User-Agent: Thunderbird 1.5.0.9 (X11/20070212) MIME-Version: 1.0 To: Anton Blanchard CC: Christoph Hellwig , Arjan van de Ven , Roman Zippel , David Brown , Linux Kernel Mailing List , gdb@sourceware.org Subject: Re: PAGE_SIZE Availability Inconsistency References: <9c21eeae0703051555x1884fd7cse7968a71ec04eb27@mail.gmail.com> <20070306092917.GA5226@infradead.org> <200703080318.04631.zippel@linux-m68k.org> <20070308090031.GB7373@infradead.org> <1173369229.3550.2.camel@laptopd505.fenrus.org> <20070308160852.GB9916@infradead.org> <45F0426C.8000009@zytor.com> <20070308175729.GA7054@kryten> In-Reply-To: <20070308175729.GA7054@kryten> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Status: Clean Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-03/txt/msg00142.txt.bz2 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 > ppc64. 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. -hpa