Re: [PATCH 04/21] sched: implement scheduler notifiers

From: Tejun Heo
Date: Mon Nov 16 2009 - 13:55:50 EST


Peter Zijlstra wrote:
> I really hate exposing activate/deactivate.
>
> You say:
>
>> Activated and deactivated are called
>> when a task's readiness to run changes.
>
> How is that not clear from the out hook? It would seem to me that when
> you get scheduled out with a p->state != TASK_RUNNING you're not ready.

In that in OUT hook the next task to switch to is already determined
and it wouldn't be symmetric with activate (but I suppose we can match
the symmetry from activate side). If deactivate/activate/in/out
events are too low level, we can have sleep/ready/run hooks instead.

Thanks.

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