[PATCH 0/7] proc/stat: Maintain monotonicity of "intr" and "softirq"

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

 



Here's a patch set that makes /proc/stat report total interrupt counts
as monotonically increasing values, just like individual counters for
interrupt types and CPUs are.

This is as if the sum was a shared counter that all CPUs increment
atomically together with their individual counters, with the sum
correctly and expectedly wrapping around to zero once it reaches
UINT_MAX.

I've also added some documentation bits to codify this behavior and make
it explicit that wrap-arounds must be expected and handled if userspace
wants to maintain accurate total interrupt count for whatever reasons.

Alexei Lozovsky (7):
  genirq: Use unsigned int for irqs_sum
  powerpc/irq: arch_irq_stat_cpu() returns unsigned int
  x86/irq: arch_irq_stat_cpu() returns unsigned int
  x86/irq: arch_irq_stat() returns unsigned int
  proc/stat: Use unsigned int for "intr" sum
  proc/stat: Use unsigned int for "softirq" sum
  docs: proc.rst: stat: Note the interrupt counter wrap-around

 Documentation/filesystems/proc.rst | 7 +++++++
 arch/powerpc/include/asm/hardirq.h | 2 +-
 arch/powerpc/kernel/irq.c          | 4 ++--
 arch/x86/include/asm/hardirq.h     | 4 ++--
 arch/x86/kernel/irq.c              | 8 ++++----
 fs/proc/stat.c                     | 8 ++++----
 include/linux/kernel_stat.h        | 2 +-
 7 files changed, 21 insertions(+), 14 deletions(-)

-- 
2.25.1




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux