From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 27 09:48:52 2013 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7981F15; Wed, 27 Nov 2013 09:48:52 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id BA0552430; Wed, 27 Nov 2013 09:48:50 +0000 (UTC) Received: from porto.starpoint.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 LAA00553; Wed, 27 Nov 2013 11:48:48 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Vlbjk-0005Il-GD; Wed, 27 Nov 2013 11:48:48 +0200 Message-ID: <5295BFC8.6030404@FreeBSD.org> Date: Wed, 27 Nov 2013 11:47:52 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: taskqueue_block References: <5287BDB9.10201@FreeBSD.org> <528B7681.6090806@FreeBSD.org> <201311211414.06849.jhb@freebsd.org> <5294BDCF.1050702@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Luigi Rizzo , Bernhard Schmidt , "freebsd-hackers@freebsd.org" , Aleksandr Rybalko , Andrew Thompson , Pyun YongHyeon X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 09:48:52 -0000 on 26/11/2013 23:42 Adrian Chadd said the following: > Hi, > > the net80211 semantics are: > > * all those tasks have to have finished; taskqueue_drain ensures this. > * no new tasks should've been started whilst we're draining those tasks. This is impossible to ensure by anything inside taskqueue implementation. > waitfor_parent wants to block until all the pending update tasks are > done. Ideally it would then stay blocked until the caller does their > thing and then unblocks the taskqueue. As I explained in my original email, these requirements are contradictory. You can not drain pending tasks having disallowed them to be run. Something like this can not be done by means of taskqueue itself. -- Andriy Gapon