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

Tejun Heo
2009-11-16T18:55:36Z

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