Re: calling kthread_create() from interrupt thread
From: Jeff Garzik
Date: Tue Jun 15 2004 - 17:17:17 EST
Jesse Barnes wrote:
On Tuesday, June 15, 2004 2:05 pm, Dean Nelson wrote:
As mentioned above, it is possible for this "simple" function to
sleep/block for an indefinite period of time. I was under the impression
that one couldn't block a work queue thread for an indefinite period of
time. Am I mistaken?
For tasklets and softirqs you're not allowed to sleep, but I think it's ok for
work queues.
Dean is correct and incorrect ;-)
If you are using schedule_work() or schedule_task(), blocking for
extended periods of time would be very undesirable. We see this on
occasion in 2.6 uniprocessor, where a long-running keventd task may
block a console or tty update.
In 2.6, the solution is easy... create your own private workqueue. No
such solution in 2.4 (though I would argue that workqueues would help
drivers, if accepted into 2.4 at this late stage).
Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/