Re: workqueue thing

From: Arjan van de Ven
Date: Fri Dec 18 2009 - 10:01:47 EST


On 12/18/2009 5:50, Andi Kleen wrote:
The only way something can be not cpu intensive and long 'running' is if
it got blocked that long, and the right solution is to fix that
contention, things should not be blocked for seconds.

Work queue items shouldn't be blocking for seconds in the normal case, but it might
always happen in the exceptional case (e.g. handling some error condition).
In this case it would be good if the other jobs wouldn't be too
disrupted and the whole setup degrades gracefully.

in addition, threads are cheap. Linux has no technical problem with running 100's of kernel threads
(if not 1000s); they cost basically a task struct and a stack (2 pages) each and that's about it.
making an elaborate-and-thus-fragile design to save a few kernel threads is likely a bad design direction...
--
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/