Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 May 2000 16:10:57 +0100 (BST)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Chuck Paterson <cp@bsdi.com>
Cc:        arch@freebsd.org
Subject:   Re: A new api for asynchronous task execution 
Message-ID:  <Pine.BSF.4.21.0005141604050.47945-100000@salmon.nlsystems.com>
In-Reply-To: <200005141411.IAA04077@berserker.bsdi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 14 May 2000, Chuck Paterson wrote:

> Doug,
> 
> 	First, in continuing this thread I'm most trying
> to make sure I have managed to get my point across, not
> necessarily convince you that you really need to make
> a change now.

I understand that. Email is not always the best medium for communication
:-).

> 	Sorry, but I'm not sure I'm parsing what you said
> correctly. I believe that you are saying that the line two
> lines I added will actually be in taskqueue_enqueue.

What I am saying is that when you call taskqueue_enqueue(&taskqueue_swi,
foo), the task will be added to taskqueue_swi and the function
taskqueue_swi_enqueue will be called via the 'enqueue' field of
taskqueue_swi. This calls setsofttq() which arranges for a software
interrupt to call taskqueue_swi_run() when conditions are suitable. This
will in turn call taskqueue_run() to drain the queue.

> Then in a kernel which as more software threads you will soon have
> the following which as far as I can tell won't be optimized out
> even if if taskqueue_enqueue() is implemented as a macro:
> 
>  	if (queue == taskqueue_swi) 
>  		setsoftaskqueue()
>  	if (queue == taskqueue_foo)
>  		setsoftaskfoo()
>  	if (queue == taskqueue_bar)
>  		setsoftaskbar()
>  	if (queue == taskqueue_xxx)
>  		setsoftaskxxx()

Each of these queues could be implemented within the current model by
using different functions in the queue->enqueue field, each of which would
perform the relavent setsoftxxx().

The intention for disassociating the implementation of scheduling and
running a queue from the queue itself is to make it possible to use the
queues for purposes other than simple software interrupts.

-- 
Doug Rabson				Mail:  dfr@nlsystems.com
Nonlinear Systems Ltd.			Phone: +44 20 8442 9037




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0005141604050.47945-100000>