author | Tomasz Pala <gotar@pld-linux.org> | |
Sat, 18 Apr 2009 15:45:01 +0000 (17:45 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 20 Apr 2009 19:34:48 +0000 (21:34 +0200) | ||
commit | 86a86038190c845be6b8903cddba71deb0ccb6ed | |
tree | fa66007254f4a1103e099d7de5cf56fa5e5e7df9 | tree | snapshot |
parent | 0d65234eb26bfe84b6457fd3b744f25ac8b947d6 | commit | diff |
irq plugin: Parse interrupt counters as unsigned long long.
Hello,
attached patch fixes accounting of most frequent interrupts (like NICs
on routers). E.g. in my case:
213: 76266 76357 76250 76397 2408617852 2411844062 2411642538 2411814531 PCI-MSI-edge eth1
214: 2621368360 2621463385 2621343444 2621386931 2349184 28 35 32 PCI-MSI-edge eth0
Here LONG_MAX (2147483647L) overflows in 10 days uptime and strtol()
returns the same value.
As all the values (including counter_t) are unsigned long long int, the
fix is trivial (for now there's no need to check for irq_value overflow;>).
--
Tomasz Pala <gotar@pld-linux.org>
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
Hello,
attached patch fixes accounting of most frequent interrupts (like NICs
on routers). E.g. in my case:
213: 76266 76357 76250 76397 2408617852 2411844062 2411642538 2411814531 PCI-MSI-edge eth1
214: 2621368360 2621463385 2621343444 2621386931 2349184 28 35 32 PCI-MSI-edge eth0
Here LONG_MAX (2147483647L) overflows in 10 days uptime and strtol()
returns the same value.
As all the values (including counter_t) are unsigned long long int, the
fix is trivial (for now there's no need to check for irq_value overflow;>).
--
Tomasz Pala <gotar@pld-linux.org>
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
src/irq.c | diff | blob | history |