From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13286 invoked by alias); 8 Mar 2007 21:48:33 -0000 Received: (qmail 13273 invoked by uid 22791); 8 Mar 2007 21:48:32 -0000 X-Spam-Check-By: sourceware.org Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net (HELO sunset.davemloft.net) (74.93.104.97) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 08 Mar 2007 21:48:27 +0000 Received: from localhost (localhost [127.0.0.1]) by sunset.davemloft.net (Postfix) with ESMTP id 1FC8BAE55EA; Thu, 8 Mar 2007 13:48:26 -0800 (PST) Date: Thu, 08 Mar 2007 21:48:00 -0000 Message-Id: <20070308.134825.45514445.davem@davemloft.net> To: anton@samba.org Cc: hpa@zytor.com, hch@infradead.org, arjan@infradead.org, zippel@linux-m68k.org, dmlb2000@gmail.com, linux-kernel@vger.kernel.org, gdb@sourceware.org Subject: Re: PAGE_SIZE Availability Inconsistency From: David Miller In-Reply-To: <20070308214236.GA4154@kryten> References: <20070308175729.GA7054@kryten> <45F05040.4090602@zytor.com> <20070308214236.GA4154@kryten> X-Mailer: Mew version 5.1.52 on Emacs 21.4 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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/msg00148.txt.bz2 From: Anton Blanchard Date: Thu, 8 Mar 2007 15:42:36 -0600 > > 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. > > Yeah that makes sense. I gave it a go by creating a MIN_PAGE_SIZE > define, and allowing an architecture to override it if required. I might be missing something but doesn't this break every SWAP partition that was created with something other than MIN_PAGE_SIZE?