]> git.proxmox.com Git - mirror_spl-debian.git/commit - module/spl/spl-taskq.c
Implementation of the TQ_FRONT flag.
authorNed Bass <bass6@llnl.gov>
Thu, 1 Jul 2010 17:07:51 +0000 (10:07 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 1 Jul 2010 17:59:38 +0000 (10:59 -0700)
commitf0d8bb26b492dca0da1faff50b097b1665143bf4
treea344b04337d4d73ca45947fea56876918c4bf525
parentc2688979a4ee3b9c0b1d00e94ce2a37ba71b6af6
Implementation of the TQ_FRONT flag.

Adds a task queue to receive tasks dispatched with TQ_FRONT.  Worker
threads pull tasks from this high priority queue before the default
pending queue.

Executing tasks out of FIFO order potentially breaks taskq_lowest_id()
if we do not preserve the ordering of the work list by taskqid.
Therefore, instead of always appending to the work list, we search for
the appropriate place to insert a task.  The common case is to append
to the list, so we make this operation efficient by searching the work
list in reverse order.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
include/sys/taskq.h
module/spl/spl-taskq.c