From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Howells Subject: Re: [PATCH] PAG support, try #2 Date: Wed, 14 May 2003 13:03:10 +0100 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <31039.1052913790@warthog.warthog> References: <20030514114953.GS29534@parcelfarce.linux.theplanet.co.uk> Mime-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: text/plain; charset=US-ASCII Cc: David Howells , torvalds@transmeta.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Return-path: Received: from pub237.cambridge.redhat.com ([213.86.99.237]:10996 "EHLO warthog.warthog") by vger.kernel.org with ESMTP id S261871AbTENLud (ORCPT ); Wed, 14 May 2003 07:50:33 -0400 To: Matthew Wilcox In-Reply-To: <20030514114953.GS29534@parcelfarce.linux.theplanet.co.uk> List-Id: linux-fsdevel.vger.kernel.org > > +typedef __kernel_pag_t pag_t; > > > +static pag_t vfs_pag_next = 1; > > > + vfspag->pag = vfs_pag_next++; > > + if (vfspag->pag < 1) > > + vfspag->pag = 1; > > Is there a reason pag_t isn't an unsigned int? Seems to me you'll have > 2^31 good times followed by 2^31 bad times. Also, isn't signed overflow > one of these undefined things? I wouldn't mention it except that gcc > seem to be more and more fond of obeying the letter of the standard > rather than doing useful stuff. I made it the same as pid_t. However, -ve PIDs can have special meanings which aren't applicable to PAGs, so I suppose it ought to be unsigned. Time to change it again. Sigh. David