> My current tree says
>
> asmlinkage void preempt_schedule(void)
> {
> if (unlikely(preempt_get_count()))
> return;
> if (current->state != TASK_RUNNING)
> return;
> schedule();
> }
You need to do the same thing in entry.S ... Ingo decoupled the two
entry paths from each other (entry.S does preempt_schedule's work on its
own, and then directly calls schedule).
So, right now the ret_from_intr path sets the task state to
TASK_RUNNING. That needs to be replaced with a jump out if it is NOT
task running.
Curiously, what is wrong with the way we did it in the original patch?
I.e. set a bit in preempt_count and use that to skip to pick_next_task
in schedule. This allows us to preempt any task of any state ...
Robert Love
-
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/