Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Feb 2012 01:59:46 GMT
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/165382: [kern] taskqueue_unblock doesn't unblock currently queued tasks
Message-ID:  <201202220159.q1M1xkNa070272@red.freebsd.org>
Resent-Message-ID: <201202220200.q1M20OA4081267@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202220159.q1M1xkNa070272>