Skip to content

Commit 929bd2a

Browse files
zq-david-wangandreas-gaisler
authored andcommitted
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 <[email protected]> Reviewed-by: Andreas Larsson <[email protected]> Tested-by: Andreas Larsson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Andreas Larsson <[email protected]>
1 parent 40384c8 commit 929bd2a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

arch/sparc/kernel/irq_32.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,18 +199,18 @@ int arch_show_interrupts(struct seq_file *p, int prec)
199199
int j;
200200

201201
#ifdef CONFIG_SMP
202-
seq_printf(p, "RES: ");
202+
seq_printf(p, "RES:");
203203
for_each_online_cpu(j)
204-
seq_printf(p, "%10u ", cpu_data(j).irq_resched_count);
204+
seq_put_decimal_ull_width(p, " ", cpu_data(j).irq_resched_count, 10);
205205
seq_printf(p, " IPI rescheduling interrupts\n");
206-
seq_printf(p, "CAL: ");
206+
seq_printf(p, "CAL:");
207207
for_each_online_cpu(j)
208-
seq_printf(p, "%10u ", cpu_data(j).irq_call_count);
208+
seq_put_decimal_ull_width(p, " ", cpu_data(j).irq_call_count, 10);
209209
seq_printf(p, " IPI function call interrupts\n");
210210
#endif
211-
seq_printf(p, "NMI: ");
211+
seq_printf(p, "NMI:");
212212
for_each_online_cpu(j)
213-
seq_printf(p, "%10u ", cpu_data(j).counter);
213+
seq_put_decimal_ull_width(p, " ", cpu_data(j).counter, 10);
214214
seq_printf(p, " Non-maskable interrupts\n");
215215
return 0;
216216
}

arch/sparc/kernel/irq_64.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,9 @@ int arch_show_interrupts(struct seq_file *p, int prec)
304304
{
305305
int j;
306306

307-
seq_printf(p, "NMI: ");
307+
seq_printf(p, "NMI:");
308308
for_each_online_cpu(j)
309-
seq_printf(p, "%10u ", cpu_data(j).__nmi_count);
309+
seq_put_decimal_ull_width(p, " ", cpu_data(j).__nmi_count, 10);
310310
seq_printf(p, " Non-maskable interrupts\n");
311311
return 0;
312312
}

0 commit comments

Comments
 (0)