taskqueues

John Baldwin jhb at freebsd.org
Thu May 30 12:18:53 UTC 2013


On Thursday, May 30, 2013 2:04:48 am Orit Moskovich wrote:
> Also, is it possible to set affinity of a task in a taskqueue? From what I 
understood, each interrupt thread handling taskqueues and the ithread of the 
bus_setup_intr is a single thread, not one per cpu.

Correct.

> What possibilities I have if I need to defer work from a filter routine to 
multiple tasks, and schedule them to work on a specific core?

Currently there is no pre-built API to give you per-CPU work queues.  However,
you could create a taskqueue for each CPU (and schedule an initial task that
calls sched_bind() to bind the associated thread to a specific CPU) and then 
you could schedule a task for a specific CPU by scheduling it on the taskqueue 
for a specific CPU.

-- 
John Baldwin


More information about the freebsd-drivers mailing list