linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] /proc/stat: Reduce irqs counting performance overhead
@ 2019-01-09 17:23 Waiman Long
  2019-01-09 17:23 ` [PATCH v2 1/4] /proc/stat: Extract irqs counting code into show_stat_irqs() Waiman Long
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Waiman Long @ 2019-01-09 17:23 UTC (permalink / raw)
  To: Andrew Morton, Alexey Dobriyan, Kees Cook, Thomas Gleixner
  Cc: linux-kernel, linux-fsdevel, Davidlohr Bueso, Miklos Szeredi,
	Daniel Colascione, Dave Chinner, Randy Dunlap, Matthew Wilcox,
	Waiman Long

v1: https://lkml.org/lkml/2019/1/7/899

As newer systems have more and more IRQs and CPUs available in their
system, the performance of reading /proc/stat frequently is getting
worse and worse.

It appears that the idea of caching the IRQ counts in the v1 patch to
reduce the frequency of doing percpu summation and use a sysctl parameter
to control it was not well received.

This v2 patch optimizes the way the IRQ counts are retrieved and computed
and getting rid of the sysctl parameter altogether to achieve a performance
gain that is close to the v1 patch. This is based on the idea that while
many IRQs can be supported by a system, only a handful of them are actually
being used in most cases. We can save a lot of time by focusing on those
active IRQs only and ignore the rests.

Patch 1 is the same as that in v1 while the other 3 patches are new.

Waiman Long (4):
  /proc/stat: Extract irqs counting code into show_stat_irqs()
  /proc/stat: Only do percpu sum of active IRQs
  genirq: Track the number of active IRQs
  /proc/stat: Call kstat_irqs_usr() only for active IRQs

 fs/proc/stat.c          | 123 ++++++++++++++++++++++++++++++++++++++++++++----
 include/linux/irqdesc.h |   1 +
 kernel/irq/internals.h  |   6 ++-
 kernel/irq/irqdesc.c    |   7 ++-
 4 files changed, 125 insertions(+), 12 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-01-09 20:14 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-09 17:23 [PATCH v2 0/4] /proc/stat: Reduce irqs counting performance overhead Waiman Long
2019-01-09 17:23 ` [PATCH v2 1/4] /proc/stat: Extract irqs counting code into show_stat_irqs() Waiman Long
2019-01-09 17:23 ` [PATCH v2 2/4] /proc/stat: Only do percpu sum of active IRQs Waiman Long
2019-01-09 17:23 ` [PATCH v2 3/4] genirq: Track the number " Waiman Long
2019-01-09 17:23 ` [PATCH v2 4/4] /proc/stat: Call kstat_irqs_usr() only for " Waiman Long
2019-01-09 17:23   ` Waiman Long
2019-01-09 17:39   ` Waiman Long
2019-01-09 17:44 ` [PATCH v2 0/4] /proc/stat: Reduce irqs counting performance overhead Matthew Wilcox
2019-01-09 18:03   ` Waiman Long
2019-01-09 18:24     ` Matthew Wilcox
2019-01-09 18:37       ` Waiman Long
2019-01-09 18:52         ` Matthew Wilcox
2019-01-09 18:57           ` Waiman Long
2019-01-09 18:54         ` Waiman Long
2019-01-09 19:59           ` Matthew Wilcox
2019-01-09 19:59             ` Matthew Wilcox
2019-01-09 20:14             ` Waiman Long
2019-01-09 20:14               ` Waiman Long

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).