From owner-svn-src-all@freebsd.org Wed Nov 9 16:05:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0927CC378F9; Wed, 9 Nov 2016 16:05:02 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5AD192E; Wed, 9 Nov 2016 16:05:00 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 1E8871FE022; Wed, 9 Nov 2016 17:04:58 +0100 (CET) Subject: Re: svn commit: r308424 - head/sys/arm/broadcom/bcm2835 To: John Baldwin References: <201611071738.uA7HceYu045944@repo.freebsd.org> <680D84F2-65BF-48DD-8D11-311B1F65A634@freebsd.org> <3214848.geWV8qu7rM@ralph.baldwin.cx> Cc: Oleksandr Tymoshenko , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <5c170b6b-1189-4712-ffdd-653cc6b8c59e@selasky.org> Date: Wed, 9 Nov 2016 17:10:09 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <3214848.geWV8qu7rM@ralph.baldwin.cx> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Nov 2016 16:05:02 -0000 Hi, On 11/09/16 16:02, John Baldwin wrote: > On the other hand, doing the wakeup outside of the lock > avoids preempting during the wakeup only to immediately block on the lock and > switch back to the thread that did the wakeup. This can be predicted and avoided by the turnstiles iff cv_signal() is used under a lock. Else not. Won't doing the wakeup outside the lock cause double preemtion? First at mtx_unlock() and then inside cv_signal()/cv_broadcast(). --HPS