From owner-freebsd-arch Tue May 16 13:44:38 2000 Delivered-To: freebsd-arch@freebsd.org Received: from anchor-post-30.mail.demon.net (anchor-post-30.mail.demon.net [194.217.242.88]) by hub.freebsd.org (Postfix) with ESMTP id 9BE4F37B8F3 for ; Tue, 16 May 2000 13:44:14 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from nlsys.demon.co.uk ([158.152.125.33] helo=herring.nlsystems.com) by anchor-post-30.mail.demon.net with esmtp (Exim 2.12 #1) id 12roC9-000DcX-0U for arch@freebsd.org; Tue, 16 May 2000 21:44:01 +0100 Received: from salmon.nlsystems.com (salmon.nlsystems.com [10.0.0.3]) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id VAA05041 for ; Tue, 16 May 2000 21:48:45 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Tue, 16 May 2000 21:48:21 +0100 (BST) From: Doug Rabson To: arch@freebsd.org Subject: A new api for asynchronous task execution (2) Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-105894769-958510101=:47945" Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --0-105894769-958510101=:47945 Content-Type: TEXT/PLAIN; charset=US-ASCII Ok, after the last set of feedback, I have updated the design somewhat. This is the latest manpage and I have attached a sample implementation (not thoroughly tested). TASKQUEUE(9) FreeBSD Kernel Developer's Manual TASKQUEUE(9) NAME taskqueue - asynchronous task execution SYNOPSIS #include #include #include typedef void (*task_fn)(void *context, int pending); typedef void (*taskqueue_enqueue_fn)(void *context); struct task { STAILQ_ENTRY(task) link; /* link for queue */ int pending; /* count times task is queued */ task_fn func; /* task handler */ void *context; /* argument for handler */ }; #define TQ_DEF 0 /* use blocking mutex */ #define TQ_SPIN 1 /* use spin mutex */ void taskqueue_init(struct taskqueue *queue, const char *name, int flags, taskqueue_enqueue_fn enqueue, void *context) struct taskqueue * taskqueue_find(const char *name) void taskqueue_enqueue(struct taskqueue *queue, struct task *task) void taskqueue_run(struct taskqueue *queue) DESCRIPTION These functions provide a simple interface for asynchronous execution of code. Before a queue can be used, it must first be initialised with taskqueue_init(). The arguments to taskqueue_init() include a name which should be unique, a flag which specifies the type of SMP mutex used to protect the queue and a function which is called from taskqueue_enqueue() when a task is added to the queue to allow the queue to arrange to be run later (for instance by scheduling a software interrupt or waking a kernel thread). The function taskqueue_free() should be used to remove the queue from the global list of queues. Any tasks which are on the queue will be executed at this time. The system maintains a list of all queues which can be searched using taskqueue_find(). The first queue whose name matches is returned, other- wise NULL. To add a task to the list of tasks queued on a taskqueue, call taskqueue_enqueue() with pointers to the queue and task. If the task's pending field is zero, the task is added to the end of the list and pending is set to one, otherwise, pending is incremented. Enqueueing a task does not perform any memory allocation which makes it suitable for calling from an interrupt handler. To execute all the tasks on a queue, call taskqueue_run(). When a task is executed, first it is removed from the queue, the value of pending is recorded and the field is zeroed. The function func from the task struc- ture is called with the value of the field context its first argument and the value of pending as its second argument. The system provides a global taskqueue, taskqueue_swi, which is run via a software interrupt mechanism. To use this queue, call taskqueue_enqueue() with the value of the global variable taskqueue_swi. The queue will be run at splsofttq(). This queue can be used, for instance, for implementing interrupt handlers which must perform a significant amount of processing in the handler. The hardware interrupt handler would perform minimal processing of the interrupt and then enqueue a task to finish the work. This reduces the amount of time spent with interrupts disabled to a minimum. HISTORY This interface first appeared in FreeBSD 5.0. There is a similar facili- ty called tqueue in the Linux kernel. AUTHORS This man page was written by Doug Rabson. FreeBSD May 12, 2000 2 -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 20 8442 9037 --0-105894769-958510101=:47945 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="subr_taskqueue.c" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="subr_taskqueue.c" LyotDQogKiBDb3B5cmlnaHQgKGMpIDIwMDAg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aWdoKCk7DQoJd2hpbGUg KFNUQUlMUV9GSVJTVCgmcXVldWUtPnF1ZXVlKSkgew0KCQkvKg0KCQkgKiBD YXJlZnVsbHkgcmVtb3ZlIHRoZSBmaXJzdCB0YXNrIGZyb20gdGhlIHF1ZXVl IGFuZA0KCQkgKiB6ZXJvIGl0cyBwZW5kaW5nIGNvdW50Lg0KCQkgKi8NCgkJ dGFzayA9IFNUQUlMUV9GSVJTVCgmcXVldWUtPnF1ZXVlKTsNCgkJU1RBSUxR X1JFTU9WRV9IRUFEKCZxdWV1ZS0+cXVldWUsIGxpbmspOw0KCQlwZW5kaW5n ID0gdGFzay0+cGVuZGluZzsNCgkJdGFzay0+cGVuZGluZyA9IDA7DQoJCXNw bHgocyk7DQoNCgkJdGFzay0+ZnVuYyh0YXNrLT5jb250ZXh0LCBwZW5kaW5n KTsNCg0KCQlzID0gc3BsaGlnaCgpOw0KCX0NCglzcGx4KHMpOw0KfQ0KDQpz dGF0aWMgdm9pZA0KdGFza3F1ZXVlX3N3aV9lbnF1ZXVlKHZvaWQgKmNvbnRl eHQpDQp7DQoJc2V0c29mdHRxKCk7DQp9DQoNCnN0YXRpYyB2b2lkDQp0YXNr cXVldWVfc3dpX3J1bih2b2lkKQ0Kew0KCXRhc2txdWV1ZV9ydW4odGFza3F1 ZXVlX3N3aSk7DQp9DQoNClRBU0tRVUVVRV9ERUZJTkUoc3dpLCBUUV9ERUYs IHRhc2txdWV1ZV9zd2lfZW5xdWV1ZSwgMCwNCgkJIHJlZ2lzdGVyX3N3aShT V0lfVFEsIHRhc2txdWV1ZV9zd2lfcnVuKSk7DQo= --0-105894769-958510101=:47945 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="taskqueue.h" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="taskqueue.h" LyotDQogKiBDb3B5cmlnaHQgKGMpIDIwMDAgRG91ZyBSYWJzb24NCiAqIEFs bCByaWdodHMgcmVzZXJ2ZWQuDQogKg0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ZWZpbmUgVEFTS1FVRVVFX0RFRklORShuYW1l LCBmbGFncywgZW5xdWV1ZSwgY29udGV4dCwgaW5pdCkJCVwNCgkJCQkJCQkJ CVwNCnN0cnVjdCB0YXNrcXVldWUgKnRhc2txdWV1ZV8jI25hbWU7CQkJCQlc DQoJCQkJCQkJCQlcDQpzdGF0aWMgdm9pZAkJCQkJCQkJXA0KdGFza3F1ZXVl X2RlZmluZV8jI25hbWUodm9pZCAqYXJnKQkJCQkJXA0KewkJCQkJCQkJCVwN Cgl0YXNrcXVldWVfIyNuYW1lID0JCQkJCQlcDQoJCXRhc2txdWV1ZV9jcmVh dGUoI25hbWUsIGZsYWdzLCBlbnF1ZXVlLCBjb250ZXh0KTsJXA0KCWluaXQ7 CQkJCQkJCQlcDQp9CQkJCQkJCQkJXA0KCQkJCQkJCQkJXA0KU1lTSU5JVCh0 YXNrcXVldWVfIyNuYW1lLCBTSV9TVUJfQ09ORklHVVJFLCBTSV9PUkRFUl9T RUNPTkQsCQlcDQoJdGFza3F1ZXVlX2RlZmluZV8jI25hbWUsIE5VTEwpOw0K DQovKg0KICogVGhpcyBxdWV1ZSBpcyBzZXJ2aWNlZCBieSBhIHNvZnR3YXJl IGludGVycnVwdCBoYW5kbGVyLiBUbyBlbnF1ZXVlDQogKiBhIHRhc2ssIGNh bGwgdGFza3F1ZXVlX2VucXVldWUoJnRhc2txdWV1ZV9zd2ksICZ0YXNrKS4N CiAqLw0KVEFTS1FVRVVFX0RFQ0xBUkUoc3dpKTsNCg0KI2VuZGlmIC8qIF9L RVJORUwgKi8NCg0KI2VuZGlmIC8qICFfU1lTX1RBU0tRVUVVRV9IXyAqLw0K --0-105894769-958510101=:47945-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message