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 <alpha@FreeBSD.ORG>; 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 <jhb@FreeBSD.org>) by mail12.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for <gallatin@cs.duke.edu>; 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: <XFMail.20020510211534.jhb@FreeBSD.org> 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: <XFMail.20020510204837.jhb@FreeBSD.org> Date: Fri, 10 May 2002 21:15:34 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: John Baldwin <jhb@FreeBSD.org> Subject: Re: gcc3 & alpha kernels Cc: alc@FreeBSD.org, Jeff Roberson <jroberson@chesapeake.net>, alpha@FreeBSD.ORG, obrien@FreeBSD.ORG, Andrew Gallatin <gallatin@cs.duke.edu> Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: <freebsd-alpha.FreeBSD.ORG> List-Archive: <http://docs.freebsd.org/mail/> (Web Archive) List-Help: <mailto:majordomo@FreeBSD.ORG?subject=help> (List Instructions) List-Subscribe: <mailto:majordomo@FreeBSD.ORG?subject=subscribe%20freebsd-alpha> List-Unsubscribe: <mailto:majordomo@FreeBSD.ORG?subject=unsubscribe%20freebsd-alpha> 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 <jhb@FreeBSD.org> <>< 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