From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1657 invoked by alias); 21 Mar 2007 02:52:47 -0000 Received: (qmail 1648 invoked by uid 22791); 21 Mar 2007 02:52:46 -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; Wed, 21 Mar 2007 02:52:44 +0000 Received: from [172.28.172.179] ([66.0.95.132]) (authenticated bits=0) by terminus.zytor.com (8.13.8/8.13.7) with ESMTP id l2L2m8Ui000636 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 20 Mar 2007 19:48:11 -0700 Message-ID: <46009CEA.1050206@zytor.com> Date: Wed, 21 Mar 2007 02:52:00 -0000 From: "H. Peter Anvin" User-Agent: Thunderbird 1.5.0.10 (X11/20070301) MIME-Version: 1.0 To: Anton Blanchard CC: David Miller , 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 References: <20070308.134825.45514445.davem@davemloft.net> <20070309024324.GA24695@kryten> <45F0E014.8060907@zytor.com> <20070308.202718.68040662.davem@davemloft.net> <45F0E309.70403@zytor.com> <20070321021202.GA11745@kryten> In-Reply-To: <20070321021202.GA11745@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/msg00242.txt.bz2 Anton Blanchard wrote: > Hi, > >> The advantage would be that it wouldn't require a v3 for platforms for >> which MIN_PAGE_SIZE == PAGE_SIZE, which accounts for a very large >> percentage of systems. >> >> You still have to look for the darn magic in two places, so there is no >> reason for it to be different. > > The problem is if you can hit in two places then what PAGE_SIZE should > you use to size the contents of the swap header while remaining backward > compatible. > > Im leaning towards Dave suggestion of creating a clean v3 swap header. > Changing the header format doesn't make *ANY* difference whatsoever. You have to write two copies of the swap header, and the kernel should check for a header at MIN_PAGE_SIZE first and then at PAGE_SIZE. If there are fields (other than position) in the v2 swap header that are dependent on PAGE_SIZE, then the copy at MIN_PAGE_SIZE should be sized using MIN_PAGE_SIZE, and the copy at PAGE_SIZE should be sized at PAGE_SIZE. It's that simple. Creating a new format will not help that one iota, and will create gratuitous incompatiblity for the very common case of PAGE_SIZE == MIN_PAGE_SIZE. -hpa -hpa