mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Question : sched_rt.c : Loss of stats?? requeue_task_rt() does not call update_curr_rt() which updates stats
@ 2007-08-09  5:02 Mitchell Erblich
  2007-08-09  8:24 ` Dmitry Adamushko
  0 siblings, 1 reply; 2+ messages in thread
From: Mitchell Erblich @ 2007-08-09  5:02 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel

sched_rt.c : requeue_task_rt()

The comment states the problem requeue no dequeue.
Put task to the end of the run list without the overhead of dequeue
followed by enqueue.

dequeue_task_rt() updates stats. Where without calling
it will skip the stat update.

Thus, shouldn't  requeue_task_rt() call
  update_curr_rt(rq); ???

Mitchell Erblich.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Question : sched_rt.c : Loss of stats?? requeue_task_rt() does not call update_curr_rt() which updates stats
  2007-08-09  5:02 Question : sched_rt.c : Loss of stats?? requeue_task_rt() does not call update_curr_rt() which updates stats Mitchell Erblich
@ 2007-08-09  8:24 ` Dmitry Adamushko
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Adamushko @ 2007-08-09  8:24 UTC (permalink / raw)
  To: Mitchell Erblich; +Cc: mingo, linux-kernel

On 09/08/07, Mitchell Erblich <erblichs@earthlink.net> wrote:
> sched_rt.c : requeue_task_rt()
>
> The comment states the problem requeue no dequeue.
> Put task to the end of the run list without the overhead of dequeue
> followed by enqueue.
>
> dequeue_task_rt() updates stats. Where without calling
> it will skip the stat update.
>
> Thus, shouldn't  requeue_task_rt() call
>   update_curr_rt(rq); ???

No. As update_curr_rt() suggests it's only about collecting runtime
statistics, namely
(a) the longest interval of time a given task was consuming a CPU
(i.e. == 'current') and
(b) the total amount of time it was running.

To this goal, it would be enough to call it only in
put_prev_task_rt().. I recall, we do it in dequeue_task_rt() to catch
a case of SCHED_RR/FIFO --> SCHED_NORMAL transition (e.g. in
sched_setscheduler()).. so that may make accounting a bit less precise
for (a).


-- 
Best regards,
Dmitry Adamushko

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-09  8:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-09  5:02 Question : sched_rt.c : Loss of stats?? requeue_task_rt() does not call update_curr_rt() which updates stats Mitchell Erblich
2007-08-09  8:24 ` Dmitry Adamushko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®