[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20241108161123.9637-1-00107082@163.com>
Date: Sat, 9 Nov 2024 00:11:23 +0800
From: David Wang <00107082@....com>
To: davem@...emloft.net,
andreas@...sler.com
Cc: linux-kernel@...r.kernel.org,
sparclinux@...r.kernel.org,
David Wang <00107082@....com>
Subject: [PATCH 03/13] sparc/irq: use seq_put_decimal_ull_width() for decimal values
Performance improvement for reading /proc/interrupts on arch sparc
Signed-off-by: David Wang <00107082@....com>
---
arch/sparc/kernel/irq_32.c | 12 ++++++------
arch/sparc/kernel/irq_64.c | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/sparc/kernel/irq_32.c b/arch/sparc/kernel/irq_32.c
index 8605dd710f3c..5210991429d5 100644
--- a/arch/sparc/kernel/irq_32.c
+++ b/arch/sparc/kernel/irq_32.c
@@ -199,18 +199,18 @@ int arch_show_interrupts(struct seq_file *p, int prec)
int j;
#ifdef CONFIG_SMP
- seq_printf(p, "RES: ");
+ seq_printf(p, "RES:");
for_each_online_cpu(j)
- seq_printf(p, "%10u ", cpu_data(j).irq_resched_count);
+ seq_put_decimal_ull_width(p, " ", cpu_data(j).irq_resched_count, 10);
seq_printf(p, " IPI rescheduling interrupts\n");
- seq_printf(p, "CAL: ");
+ seq_printf(p, "CAL:");
for_each_online_cpu(j)
- seq_printf(p, "%10u ", cpu_data(j).irq_call_count);
+ seq_put_decimal_ull_width(p, " ", cpu_data(j).irq_call_count, 10);
seq_printf(p, " IPI function call interrupts\n");
#endif
- seq_printf(p, "NMI: ");
+ seq_printf(p, "NMI:");
for_each_online_cpu(j)
- seq_printf(p, "%10u ", cpu_data(j).counter);
+ seq_put_decimal_ull_width(p, " ", cpu_data(j).counter, 10);
seq_printf(p, " Non-maskable interrupts\n");
return 0;
}
diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c
index 01ee800efde3..9ab6e79b617b 100644
--- a/arch/sparc/kernel/irq_64.c
+++ b/arch/sparc/kernel/irq_64.c
@@ -304,9 +304,9 @@ int arch_show_interrupts(struct seq_file *p, int prec)
{
int j;
- seq_printf(p, "NMI: ");
+ seq_printf(p, "NMI:");
for_each_online_cpu(j)
- seq_printf(p, "%10u ", cpu_data(j).__nmi_count);
+ seq_put_decimal_ull_width(p, " ", cpu_data(j).__nmi_count, 10);
seq_printf(p, " Non-maskable interrupts\n");
return 0;
}
--
2.39.2
Powered by blists - more mailing lists