From owner-freebsd-current@freebsd.org Wed Jul 1 21:50:11 2015 Return-Path: Delivered-To: freebsd-current@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 006F39923EA for ; Wed, 1 Jul 2015 21:50:10 +0000 (UTC) (envelope-from ricera10@gmail.com) Received: from mail-ig0-x234.google.com (mail-ig0-x234.google.com [IPv6:2607:f8b0:4001:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B940B1156 for ; Wed, 1 Jul 2015 21:50:10 +0000 (UTC) (envelope-from ricera10@gmail.com) Received: by igcur8 with SMTP id ur8so103238175igc.0 for ; Wed, 01 Jul 2015 14:50:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-type; bh=jUfXpogWmlZs5Xe9lz5UyhkkDvkLJv/0DxpuiOLaxi0=; b=wdz9LSHKwhNkMcg8M5zrCVF8/8Yjn3qmq6wsWbxe6TW9zkfsqkml3vugE4QOsXbvPd uU+h8WXbvt3X5/vnXTKw0nzY7Lns8Bnx0Ydp98W6lSjxBHdQTZmEy+FoWIvYKjlRduiM LvLRBQsKc2gTrgRAQa2GdUmYm3fs2tA0zt1o3ki0LZr1zdEh02jlpvYwCvnJTbZ1N27h fDY0jL8Mb7RQzrqJQd5esafNP2FRxJKhFdml9SxObCaGBLlfmg4k9hVfB1h7Zz7+CjpX G/PLIzukP0ifKGp1+B+40fbRJIVPn20K6TbQ2fxSeKtNlCQxxCgL1LyUGI7fwZ0erLUW Q7kg== X-Received: by 10.50.143.104 with SMTP id sd8mr36216147igb.14.1435787410124; Wed, 01 Jul 2015 14:50:10 -0700 (PDT) MIME-Version: 1.0 References: <20150701213241.GG2080@kib.kiev.ua> In-Reply-To: <20150701213241.GG2080@kib.kiev.ua> From: Eric Joyner Date: Wed, 01 Jul 2015 21:50:00 +0000 Message-ID: Subject: Re: How should a driver shutdown a taskqueue on detach? To: Konstantin Belousov , Ryan Stone Cc: Jack Vogel , FreeBSD Current Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 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: Wed, 01 Jul 2015 21:50:11 -0000 Or like, "taskqueue_enqueue_if_not_draining()" ? :p On Wed, Jul 1, 2015 at 2:32 PM Konstantin Belousov wrote: > On Wed, Jul 01, 2015 at 05:09:27PM -0400, Ryan Stone wrote: > > On Wed, Jul 1, 2015 at 4:58 PM, Jack Vogel wrote: > > > > > But if you've disabled interrupts why would an "interrupt-handling > task" > > > even run?? > > > > > > Jack > > > > > > > There's a race. The task could have already have been scheduled by a > > previous interrupt and could be running while I am trying to disable > > interrupts and drain the taskqueue. > > Do you mean, you want some KPI like > boolean taskqueue_is_draining(struct taskqueue *p); > so that e.g. executed task could see if it is executing in the > shutdown state ? > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >