Q: a bogus task_running() check in try_to_wake_up() ?

From: Oleg Nesterov
Date: Sun Jul 15 2007 - 11:37:48 EST


try_to_wake_up:

if (p->se.on_rq)
goto out_running;

...

if (unlikely(task_running(rq, p)))
goto out_activate;

How it possible that rq->curr has on_rq == 0 ?

AFAICS, this can only happen if this task is rq->idle. But idle threads
should not sleep, we have a special "scheduling from the idle thread!"
check in schedule().

Thanks in advance,

Oleg.

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