Hi,
first of all I want to do this in kernel.
I need to do this to prevent a race. To handle removal of a hotpluggable
scsi device. On SMP there's a race between the task blocking the scsi
device and killing obsolete requests and other tasks queueing no requests.
If a task has passed the block before it comes into effect, but the
killing task is done with killing requests before the new request can be
queued the system will oops.
Simply calling the kernel equivalent of sched_yield() is not an option as
the number of runnable tasks can be smaller than the number of CPUs in
which case sched_yield is a nop.
Regards
Oliver
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/