workqueue function must be reentrant ?

From: Armin Schindler
Date: Mon Mar 01 2004 - 05:05:57 EST


Hi,

with the new workqueue the kernel 2.6 provides, I thought I can remove
my drivers kernel-thread. But looking at the workqueue code, it seems
my workqueue-function must be reentrant on SMP.

Not like the tasklet (where it is guaranteed that another
tasklet_schedule() will put the tasklet-function onto a queue which will not
be executed while another instance of my tasklet-function is still running)
the workqueue function may be put onto the queue of another cpu and get
called while the first one is still running on the first cpu.

Is that correct?
If yes, is it a bug or a feature?

Should I go back to my own kernel-thread to have a user-context-function
SMP-safe?

Thanks for any hint
Armin


-
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/