Re: [patch] dynticks core: Fix idle time accounting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 02 Oct 2006 23:22:38 +0200, Thomas Gleixner said:
> On Mon, 2006-10-02 at 16:17 -0400, [email protected] wrote:
> > cpu  27634 0 7762 20470 881 331 252 0
> > cpu0 27634 0 7762 20470 881 331 252 0
> > intr 812332 631476 2960 0 4 4 12667 3 14 1 1 4 142891 114 0 22193 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0
> > ctxt 2187603
> > btime 1159817297
> > processes 4028
> > procs_running 1
> > procs_blocked 0
> > nohz total I:397276 S:379955 T:1187.393123 A:0.003125 E: 629447
> > cpu  27753 0 7818 20739 881 332 253 0
> > cpu0 27753 0 7818 20739 881 332 253 0
> > intr 819027 636542 2969 0 4 4 12801 3 14 1 1 4 144371 114 0 22199 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0
> > ctxt 2209881
> > btime 1159817297
> > processes 4033
> > procs_running 1
> > procs_blocked 0
> > nohz total I:401991 S:384494 T:1200.732924 A:0.003122 E: 634513
> 
> Strange.
> 
> /me digs deeper

Not really strange at all - between code inspection and checking other stuff,
I'm now convinced the *counts* of "was the previous tick user/nice/system/idle"
reported in the cpu0 lines are accurate and report the relative counts
correctly.  The problem is that userspace tools are assuming that all the ticks
reported are created equal.  "We had 200 ticks, total, 100 were user and 100
were idle, so we were at 50/50 user/idle" - but in reality we had 100 10-ms
user ticks and 100 100-ms idle ticks and and only about 10% busy.....

We could "pump up" the relative counts - if 1 no-hz tick would have been 5ms
long, increment the count by 5 rather than 1 (for an alledged 1khz tick).
However, when we do that, we break the property that the sum of the ticks
in the 'cpu0' line is equal to the number of timer interrupts reported in the
'intr' line.

Like I said - unclear how to fix this....

Attachment: pgpti3nQkAjj8.pgp
Description: PGP signature


[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]
  Powered by Linux