From owner-freebsd-bugs@FreeBSD.ORG Wed Feb 22 02:00:24 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2D3C1065672 for ; Wed, 22 Feb 2012 02:00:24 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 6AF9F8FC16 for ; Wed, 22 Feb 2012 02:00:24 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q1M20OOt081274 for ; Wed, 22 Feb 2012 02:00:24 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q1M20OA4081267; Wed, 22 Feb 2012 02:00:24 GMT (envelope-from gnats) Resent-Date: Wed, 22 Feb 2012 02:00:24 GMT Resent-Message-Id: <201202220200.q1M20OA4081267@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Adrian Chadd Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FCB11065670 for ; Wed, 22 Feb 2012 01:59:46 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 5B5598FC13 for ; Wed, 22 Feb 2012 01:59:46 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q1M1xk1I070273 for ; Wed, 22 Feb 2012 01:59:46 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q1M1xkNa070272; Wed, 22 Feb 2012 01:59:46 GMT (envelope-from nobody) Message-Id: <201202220159.q1M1xkNa070272@red.freebsd.org> Date: Wed, 22 Feb 2012 01:59:46 GMT From: Adrian Chadd To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/165382: [kern] taskqueue_unblock doesn't unblock currently queued tasks X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 02:00:24 -0000 >Number: 165382 >Category: misc >Synopsis: [kern] taskqueue_unblock doesn't unblock currently queued tasks >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Feb 22 02:00:24 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Adrian Chadd >Release: 9.0-RELEASE >Organization: >Environment: >Description: This is more a note than a bug. taskqueue_block() only marks newly queued items as PENDING. If a task is queued to the taskqueue to be run, taskqueue_block() doesn't stop that from occuring. For example, take a single-thread taskqueue: * task A is queued - wakeup_one() is called * task B is queued - wakeup_one() is called * task A starts to run * taskqueue_block() is called from another thread * task C is queued - but instead is marked as PENDING * task A completes * task B completes * task C waits for taskqueue_unblock() to occur. This means that code which calls taskqueue_block() can't assume that once currently running tasks are completed, nothing further will be done. It can only assume that once currently QUEUED tasks are completed, nothing further will be queued. These two are subtly different. >How-To-Repeat: N/A >Fix: N/A >Release-Note: >Audit-Trail: >Unformatted: