linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] genirq/proc: Speed up show_interrupts()
@ 2024-05-13 12:05 Adrian Huang
  2024-05-13 12:05 ` [PATCH 1/2] genirq/proc: Try to jump over the unallocated irq hole whenever possible Adrian Huang
  2024-05-13 12:05 ` [PATCH 2/2] genirq/proc: Refine percpu kstat_irqs access logic Adrian Huang
  0 siblings, 2 replies; 4+ messages in thread
From: Adrian Huang @ 2024-05-13 12:05 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-kernel, linux-fsdevel, Jiwei Sun, Adrian Huang

Since there are irq number allocation holes, we can jump over those
holes in order to speed up show_interrupts().

In addition, the percpu kstat_irqs access logic can be refined.

System Configuration
====================
  * 2-socket server with 488 cores (HT-enabled).
  * The last allocated irq is 508.
  * nr_irqs = 8360. The following is from dmesg.
     NR_IRQS: 524544, nr_irqs: 8360, preallocated irqs: 16

  The biggest hole: 7852 iterations (8360 - 509 + 1) are not necessary.


Test Result
===========
  * The following result is the average execution time of ten-time
    measurements about `time cat /proc/interrupts`.

  no patch (ms)     patched (ms)     saved
  -------------     ------------    -------
           52.4             47.3       9.7%

Adrian Huang (2):
  genirq/proc: Try to jump over the unallocated irq hole whenever
    possible
  genirq/proc: Refine percpu kstat_irqs access logic

 fs/proc/interrupts.c |  6 ++++++
 kernel/irq/proc.c    | 26 ++++++++++++++++++--------
 2 files changed, 24 insertions(+), 8 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2024-05-14 23:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-13 12:05 [PATCH 0/2] genirq/proc: Speed up show_interrupts() Adrian Huang
2024-05-13 12:05 ` [PATCH 1/2] genirq/proc: Try to jump over the unallocated irq hole whenever possible Adrian Huang
2024-05-13 12:05 ` [PATCH 2/2] genirq/proc: Refine percpu kstat_irqs access logic Adrian Huang
2024-05-14 23:04   ` Thomas Gleixner

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).