On 09/18/2007 02:17 AM, Rene Herman wrote:
Second, schedule_timeout() returns immediately unless you have set the task state to TASK_UNINTERRUPTIBLE or TASK_INTERRUPTIBLE. I don't see anywhere where this is done, so the 250ms delay is in fact a busy loop. The call to schedule_timeout() appears to be quite pointless.
That mce_down code was changed over the last week by Krzysztof, myself and Takashi so not sure what version you've been looking at, but the (original) version that the quoted patch was against didn't use schedule_timeout, but a timeout based sleeping loop for cs4231 and schedule_timeout_interruptible() for ad1848 which sets the state itself.
Oh. This discrepency is caused by the fact that I work against the kernel and only check ALSA HG every once in a while. Too infrequently it seems as the _interruptible was recently (and yes, wrongly) removed from ALSA:
http://hg.alsa-project.org/alsa-kernel/rev/1768363a5f1e
It's still there in 2.6.22.x which I run. The setup has been changed around in the meantime again anyway in this case but I guess I'll make a point of working against HG more directly.
Rene.