From owner-freebsd-tinderbox@FreeBSD.ORG  Tue Nov  7 15:16:54 2006
Return-Path: <owner-freebsd-tinderbox@FreeBSD.ORG>
X-Original-To: tinderbox@freebsd.org
Delivered-To: freebsd-tinderbox@FreeBSD.ORG
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 3267316A53A;
	Tue,  7 Nov 2006 15:16:54 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net
	[66.23.211.162])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A7AE443E1B;
	Tue,  7 Nov 2006 15:15:52 +0000 (GMT) (envelope-from jhb@freebsd.org)
Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7])
	(authenticated bits=0)
	by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id kA7FFVGg058066;
	Tue, 7 Nov 2006 10:15:42 -0500 (EST) (envelope-from jhb@freebsd.org)
From: John Baldwin <jhb@freebsd.org>
To: Randall Stewart <rrs@cisco.com>
Date: Tue, 7 Nov 2006 10:11:14 -0500
User-Agent: KMail/1.9.1
References: <20061104060421.6145773068@freebsd-current.sentex.ca>
	<200611061649.56193.jhb@freebsd.org> <454FD0CF.4030705@cisco.com>
In-Reply-To: <454FD0CF.4030705@cisco.com>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200611071011.15597.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by
	milter-greylist-2.0.2 (server.baldwin.cx [192.168.0.1]);
	Tue, 07 Nov 2006 10:15:43 -0500 (EST)
X-Virus-Scanned: ClamAV 0.88.3/2172/Tue Nov 7 09:04:48 2006 on
	server.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 
	autolearn=ham version=3.1.3
X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx
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
X-BeenThere: freebsd-tinderbox@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "Tinderbox reports, responses,
	and meta-comments" <freebsd-tinderbox.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-tinderbox>, 
	<mailto:freebsd-tinderbox-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-tinderbox>
List-Post: <mailto:freebsd-tinderbox@freebsd.org>
List-Help: <mailto:freebsd-tinderbox-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-tinderbox>, 
	<mailto:freebsd-tinderbox-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 07 Nov 2006 15:16:54 -0000

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