From owner-freebsd-current@FreeBSD.ORG Tue May 17 17:01:19 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADE8D106566B; Tue, 17 May 2011 17:01:19 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 852F28FC0A; Tue, 17 May 2011 17:01:19 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 38A0546B03; Tue, 17 May 2011 13:01:19 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 879EE8A04F; Tue, 17 May 2011 13:01:18 -0400 (EDT) From: John Baldwin To: Andriy Gapon Date: Tue, 17 May 2011 11:51:17 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <4DCD357D.6000109@FreeBSD.org> <201105170958.16847.jhb@freebsd.org> <4DD28781.6050002@FreeBSD.org> In-Reply-To: <4DD28781.6050002@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201105171151.18038.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 17 May 2011 13:01:18 -0400 (EDT) Cc: Max Laier , FreeBSD current , neel@freebsd.org, Peter Grehan Subject: Re: proposed smp_rendezvous change X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 May 2011 17:01:19 -0000 On Tuesday, May 17, 2011 10:34:41 am Andriy Gapon wrote: > on 17/05/2011 16:58 John Baldwin said the following: > > No, it doesn't quite work that way. It wouldn't work on Alpha for example. > > > > All load_acq is a load with a memory barrier to order other loads after it. > > It is still free to load stale data. Only a read-modify-write operation > > would actually block until it could access an up-to-date value. > > Hmm, ok. > How about atomic_add_acq_int(&smp_rv_waiters[0], 0) ? :-) > Or an equivalent MI action that doesn't actually change smp_rv_waiters[0] value, > if there could be any. > Maybe explicit atomic_cmpset_acq_int(&smp_rv_waiters[0], 0, 0) ? > > You see at what I am getting? Yeah, either of those would work. At this point just leaving the atomic_add_int() as-is would be the smallest diff. :) -- John Baldwin