From owner-freebsd-current@FreeBSD.ORG Fri May 13 19:05:38 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 4CC12106564A for ; Fri, 13 May 2011 19:05:38 +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 943AA8FC0A for ; Fri, 13 May 2011 19:05:37 +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 WAA21248; Fri, 13 May 2011 22:05:35 +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 1QKxg7-000O67-22; Fri, 13 May 2011 22:05:35 +0300 Message-ID: <4DCD80FE.3070608@FreeBSD.org> Date: Fri, 13 May 2011 22:05:34 +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: Max Laier References: <4DCD357D.6000109@FreeBSD.org> <4DCD4E21.7020800@FreeBSD.org> <201105131150.57548.max@love2party.net> <201105131313.11677.max@love2party.net> In-Reply-To: <201105131313.11677.max@love2party.net> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org 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: Fri, 13 May 2011 19:05:38 -0000 on 13/05/2011 20:13 Max Laier said the following: > Disregard this ... I misread the diff. You are indeed using [2] correctly as > the "all-clear" semaphore. I still believe, that it is safer/cleaner to do > this spin before releasing the lock instead (see my patch). Maybe. I consider my approach a minor optimization - that is, I think that normally smp_rendezvous calls would be sparse enough to never require that synchronization (as proved by the past experience). So synchroning/delaying the master CPU at the end of smp_rendezvous would slightly hurt performance. Having the check at the start should trigger the synchronization only when it is really required. -- Andriy Gapon