tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: workqueue question

On Sat, Apr 05, 2008 at 12:16:22AM +1300, Darran Hunt wrote:

> Hi,
> I've been working on porting a driver for a crypto-acceleration card  
> to NetBSD current (4.99.54), and I'm not quite sure that I understand  
> workqueues in NetBSD.
> Basically I've got an interrupt handler that fires when the requests  
> on the card complete, and I want to schedule a job to run outside of  
> the handler to deal with finishing the request.  The workqueue looks  
> like an easy way to do this, but it only seems to allow one job to be  
> scheduled.  To schedule more than one I'd have to manage a queue of  
> work descriptors and hand one off per job - which makes the workqueue  
> a lot less attractive as a solution.
> Have I got that wrong?  Should I be able to queue multiple jobs  
> without supplying each one with a unique work structure?

Presumably you have a data structure that you use to keep track track of
each request? "struct work" can be embedded into that and you can queue as
many jobs as you like. There are also soft interrupts, for less CPU
-intensive processing tasks. See softint(9).


Home | Main Index | Thread Index | Old Index