From owner-freebsd-current@FreeBSD.ORG Sun May 15 07:12:52 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 8B54F1065673; Sun, 15 May 2011 07:12:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 9D7598FC17; Sun, 15 May 2011 07:12:50 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA09861; Sun, 15 May 2011 10:12:49 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1QLVVQ-0004wJ-SL; Sun, 15 May 2011 10:12:48 +0300 Message-ID: <4DCF7CF0.1080508@FreeBSD.org> Date: Sun, 15 May 2011 10:12:48 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110503 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: John Baldwin References: <4DCD357D.6000109@FreeBSD.org> <4DCE9EF0.3050803@FreeBSD.org> In-Reply-To: <4DCE9EF0.3050803@FreeBSD.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD current , 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: Sun, 15 May 2011 07:12:52 -0000 on 14/05/2011 18:25 John Baldwin said the following: > Hmmm, so this is not actually sufficient. NetApp ran into a very similar race > with virtual CPUs in BHyVe. In their case because virtual CPUs are threads that > can be preempted, they have a chance at a longer race. > > The problem that they see is that even though the values have been updated, the > next CPU to start a rendezvous can clear smp_rv_waiters[2] to zero before one of > the other CPUs notices that it has finished. As a follow up to my previous question. Have you noticed that in my patch no slave CPU actually waits/spins on smp_rv_waiters[2]? It's always only master CPU (and under smp_ipi_mtx). -- Andriy Gapon