[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20241108161255.9671-1-00107082@163.com>
Date: Sat, 9 Nov 2024 00:12:55 +0800
From: David Wang <00107082@....com>
To: chris@...kel.net,
jcmvbkbc@...il.com
Cc: linux-kernel@...r.kernel.org,
David Wang <00107082@....com>
Subject: [PATCH 04/13] xtensa/irq: use seq_put_decimal_ull_width() for decimal values
Performance improvement for reading /proc/interrupts on arch xtensa
Signed-off-by: David Wang <00107082@....com>
---
arch/xtensa/kernel/irq.c | 2 +-
arch/xtensa/kernel/smp.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c
index b1e410f6b5ab..c4f46989f9b7 100644
--- a/arch/xtensa/kernel/irq.c
+++ b/arch/xtensa/kernel/irq.c
@@ -58,7 +58,7 @@ int arch_show_interrupts(struct seq_file *p, int prec)
#if XTENSA_FAKE_NMI
seq_printf(p, "%*s:", prec, "NMI");
for_each_online_cpu(cpu)
- seq_printf(p, " %10lu", per_cpu(nmi_count, cpu));
+ seq_put_decimal_ull_width(p, " ", per_cpu(nmi_count, cpu), 10);
seq_puts(p, " Non-maskable interrupts\n");
#endif
return 0;
diff --git a/arch/xtensa/kernel/smp.c b/arch/xtensa/kernel/smp.c
index 94a23f100726..71ec9eced8b9 100644
--- a/arch/xtensa/kernel/smp.c
+++ b/arch/xtensa/kernel/smp.c
@@ -453,8 +453,8 @@ void show_ipi_list(struct seq_file *p, int prec)
for (i = 0; i < IPI_MAX; ++i) {
seq_printf(p, "%*s:", prec, ipi_text[i].short_text);
for_each_online_cpu(cpu)
- seq_printf(p, " %10lu",
- per_cpu(ipi_data, cpu).ipi_count[i]);
+ seq_put_decimal_ull_width(p, " ",
+ per_cpu(ipi_data, cpu).ipi_count[i], 10);
seq_printf(p, " %s\n", ipi_text[i].long_text);
}
}
--
2.39.2
Powered by blists - more mailing lists