Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 May 2002 21:15:34 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        alc@FreeBSD.org, Jeff Roberson <jroberson@chesapeake.net>, alpha@FreeBSD.ORG, obrien@FreeBSD.ORG, Andrew Gallatin <gallatin@cs.duke.edu>
Subject:   Re: gcc3 & alpha kernels
Message-ID:  <XFMail.20020510211534.jhb@FreeBSD.org>
In-Reply-To: <XFMail.20020510204837.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20020510211534.jhb>