public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: David Wang <00107082@163.com>,
	Huacai Chen <chenhuacai@loongson.cn>,
	Sasha Levin <sashal@kernel.org>,
	chenhuacai@kernel.org, tglx@linutronix.de, maobibo@loongson.cn,
	lvjianmin@loongson.cn, zhangtianyang@loongson.cn,
	loongarch@lists.linux.dev
Subject: [PATCH AUTOSEL 6.1 07/15] LoongArch/irq: Use seq_put_decimal_ull_width() for decimal values
Date: Wed, 11 Dec 2024 13:52:59 -0500	[thread overview]
Message-ID: <20241211185316.3842543-7-sashal@kernel.org> (raw)
In-Reply-To: <20241211185316.3842543-1-sashal@kernel.org>

From: David Wang <00107082@163.com>

[ Upstream commit ad2a05a6d287aef7e069c06e329f1355756415c2 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/loongarch/kernel/smp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/loongarch/kernel/smp.c b/arch/loongarch/kernel/smp.c
index 18a2b37f4aea3..6e361de705e48 100644
--- a/arch/loongarch/kernel/smp.c
+++ b/arch/loongarch/kernel/smp.c
@@ -84,7 +84,7 @@ void show_ipi_list(struct seq_file *p, int prec)
 	for (i = 0; i < NR_IPI; i++) {
 		seq_printf(p, "%*s%u:%s", prec - 1, "IPI", i, prec >= 4 ? " " : "");
 		for_each_online_cpu(cpu)
-			seq_printf(p, "%10u ", per_cpu(irq_stat, cpu).ipi_irqs[i]);
+			seq_put_decimal_ull_width(p, " ", per_cpu(irq_stat, cpu).ipi_irqs[i], 10);
 		seq_printf(p, " LoongArch  %d  %s\n", i + 1, ipi_types[i]);
 	}
 }
-- 
2.43.0


  parent reply	other threads:[~2024-12-11 18:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-11 18:52 [PATCH AUTOSEL 6.1 01/15] watchdog: it87_wdt: add PWRGD enable quirk for Qotom QCML04 Sasha Levin
2024-12-11 18:52 ` [PATCH AUTOSEL 6.1 02/15] scsi: qla1280: Fix hw revision numbering for ISP1020/1040 Sasha Levin
2024-12-11 18:52 ` [PATCH AUTOSEL 6.1 03/15] scsi: megaraid_sas: Fix for a potential deadlock Sasha Levin
2024-12-11 18:52 ` [PATCH AUTOSEL 6.1 04/15] ALSA: hda/conexant: fix Z60MR100 startup pop issue Sasha Levin
2024-12-11 18:52 ` [PATCH AUTOSEL 6.1 05/15] smb: server: Fix building with GCC 15 Sasha Levin
2024-12-11 18:52 ` [PATCH AUTOSEL 6.1 06/15] regmap: Use correct format specifier for logging range errors Sasha Levin
2024-12-11 18:52 ` Sasha Levin [this message]
2024-12-11 18:53 ` [PATCH AUTOSEL 6.1 08/15] platform/x86: asus-nb-wmi: Ignore unknown event 0xCF Sasha Levin
2024-12-11 18:53 ` [PATCH AUTOSEL 6.1 09/15] net: sched: fix ordering of qlen adjustment Sasha Levin
2024-12-11 18:53 ` [PATCH AUTOSEL 6.1 10/15] scsi: mpt3sas: Diag-Reset when Doorbell-In-Use bit is set during driver load time Sasha Levin
2024-12-11 18:53 ` [PATCH AUTOSEL 6.1 11/15] scsi: storvsc: Do not flag MAINTENANCE_IN return of SRB_STATUS_DATA_OVERRUN as an error Sasha Levin
2024-12-11 18:53 ` [PATCH AUTOSEL 6.1 12/15] drm/dp_mst: Ensure mst_primary pointer is valid in drm_dp_mst_handle_up_req() Sasha Levin
2024-12-11 18:53 ` [PATCH AUTOSEL 6.1 13/15] drm/dp_mst: Reset message rx state after OOM " Sasha Levin
2024-12-11 18:53 ` [PATCH AUTOSEL 6.1 14/15] virtio-blk: don't keep queue frozen during system suspend Sasha Levin
2024-12-11 18:53 ` [PATCH AUTOSEL 6.1 15/15] blk-mq: register cpuhp callback after hctx is added to xarray table Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241211185316.3842543-7-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=00107082@163.com \
    --cc=chenhuacai@kernel.org \
    --cc=chenhuacai@loongson.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=lvjianmin@loongson.cn \
    --cc=maobibo@loongson.cn \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=zhangtianyang@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox