Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Nov 2006 10:11:14 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        Randall Stewart <rrs@cisco.com>
Cc:        current@freebsd.org, Peter Jeremy <peterjeremy@optushome.com.au>, sparc64@freebsd.org, FreeBSD Tinderbox <tinderbox@freebsd.org>, Kip Macy <kip.macy@gmail.com>, John Birrell <jb@what-creek.com>, freebsd-sparc64@freebsd.org
Subject:   Re: [head tinderbox] failure on sparc64/sun4v
Message-ID:  <200611071011.15597.jhb@freebsd.org>
In-Reply-To: <454FD0CF.4030705@cisco.com>
References:  <20061104060421.6145773068@freebsd-current.sentex.ca> <200611061649.56193.jhb@freebsd.org> <454FD0CF.4030705@cisco.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 06 November 2006 19:18, Randall Stewart wrote:
> John Baldwin wrote:
> > On Saturday 04 November 2006 06:06, Peter Jeremy wrote:
> > 
> >>On Fri, 2006-Nov-03 23:46:27 -0800, Kip Macy wrote:
> >>
> >>>Sparc64 only supports CAS on 4 and 8 byte quantities. The only
> >>>operation it support on 16 bytes is load.
> >>
> >>The '16' in 'atomic_add_16' is bits.  Few RISC architectures can
> >>support atomic operations (or primitives to build atomic ops) on
> >>anything other than their native word side and 32 bits.
> >>
> >>The problem is that SCTP is using a 16-bit refcnt and trying to
> >>manipulate it atomically.  This is problematic on anything except i386
> >>and amd64.  The easiest solution seems to be to change refcnt to an
> >>[u]int - though I'm not sure what other impacts this may have.
> > 
> > 
> > And if possible it should just use 'refcount_*()' instead of 'atomic_*()' 
> > directly.
> > 
> ????

What I mean there is that there is a simple refcount_*() API wrapper in
sys/refcount.h that uses atomic ops on ints to safely manage reference
counts, and I would prefer the code to use refcount_*() instead of
atomic_*() directly if it fits as atomics can be tricky to manage
sometimes.

-- 
John Baldwin



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