On 06/06/07, Srivatsa Vaddagiri <[email protected]> wrote:
[ ... ]
> > This way, on RT -> NORMAL transition.. some 'delta_exec' ( between
> > deactivate_task() ---> activate_task() ) will be accounted later as if
> > the task was 'sched_fair_class' during this time.. which I think makes
> > some sense. What do you think?
> >
>
> Why not do it explicitly in __setscheduler() if the new policy is SCHED_NORMAL
> or SCHED_BATCH.
Yes this is the approach I prefer, because we burden the fast/normal
path less that way (RT->NORMAL transition is not common).
I don't think that rt_sched_class :: dequeue_task_rt() is in any of
such "fast pathes" that we should really care about an additional
math. operation.
If this approach is ok, logically-wise (no side effects from a short
'delta_exec', esp. on RT -> NORMAL).. I think it's better as it keeps
the 'sched_class' interface simpler.
That's why I
was considering a set_curr_task() method in fair_sched_class which will
be invoked in __setscheduler() if the new policy of currently running
task happens to be SCHED_NORMAL/BATCH. Alternately if the new policy of
currently running task happens to be SCHED_FIFO (and its old policy was
SCHED_NORMAL) we need to invoke put_prev_task() method (so that
fair_clock etc is updated based on outgoing task's execution time in
SCHED_NORMAL class).
rt_sched_class :: put_prev_task() from __setscheduler() ? But it's not
supposed to be called from here, logically-wise. You just rely on its
current behavior (which is only about updating 'exec_start' and
'exec_sum') -- that's just bad. Maybe I misunderatood your intention
though..
--
Regards,
vatsa
--
Best regards,
Dmitry Adamushko
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]