Subject: Re: soc zfs: taskqueue / workqueue
To: None <tech-kern@netbsd.org>
From: Mindaugas R. <rmind@NetBSD.org>
List: tech-kern
Date: 07/10/2007 18:15:57
Daniel Carosone <dan@geek.com.au> wrote:
> As well as the instance examples from freebsd, we've talked before
> about per-cpu workqueues each with a cpu-bound lwp processing jobs
> from it, for running things like est frequency changes.
> 
> If you wanted to run something on all cpu's, you could either insert a
> task on all those queues, or arrange for the task to run on the first,
> and add itself to the next cpu's workqueue each time, depending on the
> nature of what you wanted to run.
Since kthreads could be per-CPU, workqueue(9) interface could be adopted too.
I am not sure about having some per-CPU kthreads (created at mi_cpu_attach())
as general worker-threads - would this be reasonable?

http://www.netbsd.org/~rmind/workqueue.diff  (not tested)
Comments?

-- 
Best regards,
Mindaugas
www.NetBSD.org