Re: [patch] smptimers, old BH removal, tq-cleanup, 2.5.39

Ingo Molnar (
Sun, 29 Sep 2002 21:27:19 +0200 (CEST)

yes, wrt. keventd i was thinking along the same line - but in a different,
perhaps cleaner and simpler direction.

i'd like to introduce the following interfaces:

- create_work_queue(wq, handler_fn)

- destroy_work_queue(wq)

- queue_work(wq, work_fn, work_data)

- flush_work_queue(wq)

this is an extension of the keventd concept. A work queue is a simplified
interface to create a kernel thread that gets work queued from IRQ and
process contexts. No more, no less.

there would be a number of 'default' work-queues that would be created
upon bootup:

- &irq_workqueue
- &io_workqueue

each work queue would get its own separate kernel thread. schedule_task()
would simply queue to the irq_workqueue. We could make the irq_workqueue's
kernel thread a highprio RT thread, to make it really softirq-alike. (Or
for the very specific case of BH_IMMEDIATE type of stricly IRQ-safe work,
we could add a tasklet that works down this queue.)

There's tons of code within the kernel that can be streamlined this way,
most of the helper threads do this kind of functionality. (I'll post a
patch soon to show how it would look like.)


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at