Re: Wrong/misleading SoftIRQ statistics in account_system_time()?

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

 



I recheck the fact you found and here's what I thought: yes, the tick
will be attributed to softirq, however as we know disabling local
bottom halves won't happen too long...so soon after it's enabled
again, tick accounting will be back attributed to system time.

I hacked the kernel so that account_system_time() can differentiate between "true" soft
IRQs and code running under local_bh_disable(). (The hack itself is quite ugly, but does
the job). An experiment that sends UDP packets as quickly as possible, now shows that over
25% of the time is taken by the latter. Here's a snapshot of the /proc/stat values,
normalised and displayed as percentage of the total time (similar to mpstat):

CPU   %user   %nice    %sys %iowait    %irq   %soft  %steal  %guest %bh_dis   %idle
  0    2.01    0.00   46.73    0.00    3.02   23.62    0.00    0.00   24.62    0.00
  0    2.49    0.00   44.28    0.00    2.99   21.89    0.00    0.00   28.36    0.00
  0    1.52    0.00   44.95    0.00    3.03   22.22    0.00    0.00   28.28    0.00
  0    1.49    0.00   48.51    0.00    2.97   21.29    0.00    0.00   25.74    0.00
  0    3.50    0.00   48.50    0.00    3.50   23.50    0.00    0.00   21.00    0.00
  0    2.51    0.00   44.72    0.00    3.02   23.12    0.00    0.00   26.63    0.00
  0    3.98    0.00   47.76    0.00    2.49   23.38    0.00    0.00   22.39    0.00
  0    2.00    0.00   45.00    0.00    2.50   24.00    0.00    0.00   26.50    0.00
  0    1.51    0.00   49.25    0.00    2.51   23.62    0.00    0.00   23.12    0.00

The bh_dis field is the one I added. Clearly, this is not a negligible amount of processor
time.

Elad



--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux