mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
To: David Wang <00107082@163.com>,
	ysato@users.sourceforge.jp, dalias@libc.org
Cc: linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org
Subject: Re: [PATCH 13/13] sh/irq: use seq_put_decimal_ull_width() for decimal values
Date: Sat, 30 Nov 2024 13:41:54 +0100	[thread overview]
Message-ID: <bc772ca68b843e89ec201db46e3dc94d55faebaf.camel@physik.fu-berlin.de> (raw)
In-Reply-To: <20241108162634.9945-1-00107082@163.com>

Hi David,

On Sat, 2024-11-09 at 00:26 +0800, David Wang wrote:
> Performance improvement for reading /proc/interrupts on arch sh
> 
> Signed-off-by: David Wang <00107082@163.com>
> ---
>  arch/sh/kernel/irq.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c
> index 4e6835de54cf..9022d8af9d68 100644
> --- a/arch/sh/kernel/irq.c
> +++ b/arch/sh/kernel/irq.c
> @@ -43,9 +43,9 @@ int arch_show_interrupts(struct seq_file *p, int prec)
>  {
>  	int j;
>  
> -	seq_printf(p, "%*s: ", prec, "NMI");
> +	seq_printf(p, "%*s:", prec, "NMI");
>  	for_each_online_cpu(j)
> -		seq_printf(p, "%10u ", per_cpu(irq_stat.__nmi_count, j));
> +		seq_put_decimal_ull_width(p, " ", per_cpu(irq_stat.__nmi_count, j), 10);
>  	seq_printf(p, "  Non-maskable interrupts\n");
>  
>  	seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count));

Sorry for the very late reply!

I don't quite understand why seq_put_decimal_ull_width() should be faster than seq_printf().

Can you elaborate on this a bit more?

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

  reply	other threads:[~2024-11-30 12:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-08 16:26 David Wang
2024-11-30 12:41 ` John Paul Adrian Glaubitz [this message]
2024-11-30 12:44   ` John Paul Adrian Glaubitz
2024-11-30 13:34     ` David Wang
2024-11-30 13:49     ` [PATCH v2] " David Wang
2025-01-30  8:28       ` John Paul Adrian Glaubitz

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=bc772ca68b843e89ec201db46e3dc94d55faebaf.camel@physik.fu-berlin.de \
    --to=glaubitz@physik.fu-berlin.de \
    --cc=00107082@163.com \
    --cc=dalias@libc.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=ysato@users.sourceforge.jp \
    /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

all inboxes | Powered by JetHome®