From owner-freebsd-alpha Fri May 10 18:15:56 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 6DDCC37B400 for ; Fri, 10 May 2002 18:15:52 -0700 (PDT) Received: (qmail 4571 invoked from network); 11 May 2002 01:15:50 -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 01:15:50 -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 g4B1FbF44844; Fri, 10 May 2002 21:15:37 -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: Date: Fri, 10 May 2002 21:15:34 -0400 (EDT) From: John Baldwin To: John Baldwin Subject: Re: gcc3 & alpha kernels Cc: alc@FreeBSD.org, Jeff Roberson , alpha@FreeBSD.ORG, obrien@FreeBSD.ORG, Andrew Gallatin 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 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. -- 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