Skip to content

Commit ad2a05a

Browse files
zq-david-wangchenhuacai
authored andcommitted
LoongArch/irq: Use seq_put_decimal_ull_width() for decimal values
Performance improvement for reading /proc/interrupts on LoongArch. On a system with n CPUs and m interrupts, there will be n*m decimal values yielded via seq_printf(.."%10u "..) which is less efficient than seq_put_decimal_ull_width(), stress reading /proc/interrupts indicates ~30% performance improvement with this patch (and its friends). Signed-off-by: David Wang <00107082@163.com> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
1 parent 55dc2f8 commit ad2a05a

File tree

1 file changed

+1
-1
lines changed
  • arch/loongarch/kernel

1 file changed

+1
-1
lines changed

arch/loongarch/kernel/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void show_ipi_list(struct seq_file *p, int prec)
8282
for (i = 0; i < NR_IPI; i++) {
8383
seq_printf(p, "%*s%u:%s", prec - 1, "IPI", i, prec >= 4 ? " " : "");
8484
for_each_online_cpu(cpu)
85-
seq_printf(p, "%10u ", per_cpu(irq_stat, cpu).ipi_irqs[i]);
85+
seq_put_decimal_ull_width(p, " ", per_cpu(irq_stat, cpu).ipi_irqs[i], 10);
8686
seq_printf(p, " LoongArch %d %s\n", i + 1, ipi_types[i]);
8787
}
8888
}

0 commit comments

Comments
 (0)