From owner-freebsd-alpha Fri May 10 20: 3:51 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from mail.speakeasy.net (mail12.speakeasy.net [216.254.0.212]) by hub.freebsd.org (Postfix) with ESMTP id 47B2737B408 for ; Fri, 10 May 2002 20:03:42 -0700 (PDT) Received: (qmail 6204 invoked from network); 11 May 2002 03:03:41 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail12.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 11 May 2002 03:03:41 -0000 Received: from laptop.baldwin.cx (laptop.baldwin.cx [192.168.0.4]) by server.baldwin.cx (8.11.6/8.11.6) with ESMTP id g4B33dF45168; Fri, 10 May 2002 23:03:39 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20020511025746.GD13871@cs.rice.edu> Date: Fri, 10 May 2002 23:03:36 -0400 (EDT) From: John Baldwin To: Alan Cox Subject: Re: gcc3 & alpha kernels Cc: Andrew Gallatin , obrien@FreeBSD.ORG, alpha@FreeBSD.ORG, Jeff Roberson , alc@FreeBSD.org Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 11-May-2002 Alan Cox wrote: > On Fri, May 10, 2002 at 09:15:34PM -0400, John Baldwin wrote: >> >> On 11-May-2002 John Baldwin wrote: >> > One fix would be to cast object->pg_color to an int for this call but that >> > still has wrapping issues. A better fix is probably to stop >> > microptimizing >> > struct vm_object and use a int for pg_color. I suggest that all the >> > atomic >> > ops buried in the vm code be checked very carefully for these types of >> > short/int mismatches as well as any int/long mismatches and the like. >> >> Making next_index and incr be u_short instead of int also might fix >> this. However, then you would really need to use atomic_cmpset_short(), >> and we really want to deprecate that since it isn't really feasible >> on sparc64 and some other arch's. I would probably vote for just making >> pg_color a u_int and changing next_index and incr to be u_int. >> > > Agreed. I've changed hash_rand as well. Could someone please test > the attached patch? Well, I've a somewhat similar verison (still uses signed values though) that I'm testing here that still hangs. I'll try this exact patch in a second though. > Thanks, > Alan -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message