aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorThomas Gleixner <[email protected]>2019-02-08 14:48:04 +0100
committerThomas Gleixner <[email protected]>2019-02-10 21:34:46 +0100
commitc2da3f1b711173b72378258496b49f74db7479de (patch)
treec554e6c018f6a642c892fef2ddb4f38a2643cef5 /tools/perf/scripts/python/export-to-sqlite.py
parent1136b0728969901a091f0471968b2b76ed14d9ad (diff)
proc/stat: Make the interrupt statistics more efficient
Waiman reported that on large systems with a large amount of interrupts the readout of /proc/stat takes a long time to sum up the interrupt statistics. In principle this is not a problem. but for unknown reasons some enterprise quality software reads /proc/stat with a high frequency. The reason for this is that interrupt statistics are accounted per cpu. So the /proc/stat logic has to sum up the interrupt stats for each interrupt. The interrupt core provides now a per interrupt summary counter which can be used to avoid the summation loops completely except for interrupts marked PER_CPU which are only a small fraction of the interrupt space if at all. Another simplification is to iterate only over the active interrupts and skip the potentially large gaps in the interrupt number space and just print zeros for the gaps without going into the interrupt core in the first place. Waiman provided test results from a 4-socket IvyBridge-EX system (60-core 120-thread, 3016 irqs) excuting a test program which reads /proc/stat 50,000 times: Before: 18.436s (sys 18.380s) After: 3.769s (sys 3.742s) Reported-by: Waiman Long <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Alexey Dobriyan <[email protected]> Reviewed-by: Waiman Long <[email protected]> Reviewed-by: Marc Zyngier <[email protected]> Reviewed-by: Davidlohr Bueso <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Kees Cook <[email protected]> Cc: [email protected] Cc: Davidlohr Bueso <[email protected]> Cc: Miklos Szeredi <[email protected]> Cc: Daniel Colascione <[email protected]> Cc: Dave Chinner <[email protected]> Cc: Randy Dunlap <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions