• Ankita Garg's avatar
    sched: fix accounting in task delay accounting & migration · 46ac22ba
    Ankita Garg authored
    On Thu, Jun 19, 2008 at 12:27:14PM +0200, Peter Zijlstra wrote:
    > On Thu, 2008-06-05 at 10:50 +0530, Ankita Garg wrote:
    >
    > > Thanks Peter for the explanation...
    > >
    > > I agree with the above and that is the reason why I did not see weird
    > > values with cpu_time. But, run_delay still would suffer skews as the end
    > > points for delta could be taken on different cpus due to migration (more
    > > so on RT kernel due to the push-pull operations). With the below patch,
    > > I could not reproduce the issue I had seen earlier. After every dequeue,
    > > we take the delta and start wait measurements from zero when moved to a
    > > different rq.
    >
    > OK, so task delay delay accounting is broken because it doesn't take
    > migration into account.
    >
    > What you've done is make it symmetric wrt enqueue, and account it like
    >
    >   cpu0      cpu1
    >
    > enqueue
    >  <wait-d1>
    > dequeue
    >             enqueue
    >              <wait-d2>
    >             run
    >
    > Where you add both d1...
    46ac22ba
sched_stats.h 8.03 KB