Re: how to let all others run

©[@ÄØÿ¿8þÿ¿Trever L. Adams (Oliver.Neukum@lrz.uni-muenchen.de)
Thu, 5 Apr 2001 22:41:45 +0200 (MET DST)


> Doesn't even show on `top`. Further, it gets the CPU about 100 times
> a second (HZ). This is normally what you want for something that
> polls, buts needs to give up the CPU so that whatever it's waiting
> for can get done as soon as possible.

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/