> >> The target process is *already* waiting for the IO stuck inside the
> >> kernel. It is not on a runqueue, not it is considered to be places
> >> there.

> >
> > since procwrite doesn't acquire anything other than the debug lock,
> > how do you know? the proc could start up again before you notice.

> How? If there's a stop message already written to /proc/n/ctl. Once
> that is done, the process is guaranteed to be in 2 states and those
> states only: continue waiting for the I/O, being actually Stopped.
> Both of the don't let the scheduler take it to the runqueue.

here's the senerio, i think (works fine on a single processor)
a b
acquire debug lock
sleep complete io
run a bit

- erik