mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Larsson <andreas@gaisler.com>
To: David Wang <00107082@163.com>, davem@davemloft.net
Cc: linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org
Subject: Re: [PATCH 03/13] sparc/irq: use seq_put_decimal_ull_width() for decimal values
Date: Fri, 17 Jan 2025 16:28:29 +0100	[thread overview]
Message-ID: <69e24f81-c9fd-4815-b803-c6d094b84e9d@gaisler.com> (raw)
In-Reply-To: <20241108161123.9637-1-00107082@163.com>

On 2024-11-08 17:11, David Wang wrote:
> Performance improvement for reading /proc/interrupts on arch sparc
> 
> Signed-off-by: David Wang <00107082@163.com>
> ---
>  arch/sparc/kernel/irq_32.c | 12 ++++++------
>  arch/sparc/kernel/irq_64.c |  4 ++--
>  2 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/sparc/kernel/irq_32.c b/arch/sparc/kernel/irq_32.c
> index 8605dd710f3c..5210991429d5 100644
> --- a/arch/sparc/kernel/irq_32.c
> +++ b/arch/sparc/kernel/irq_32.c
> @@ -199,18 +199,18 @@ int arch_show_interrupts(struct seq_file *p, int prec)
>  	int j;
>  
>  #ifdef CONFIG_SMP
> -	seq_printf(p, "RES: ");
> +	seq_printf(p, "RES:");
>  	for_each_online_cpu(j)
> -		seq_printf(p, "%10u ", cpu_data(j).irq_resched_count);
> +		seq_put_decimal_ull_width(p, " ", cpu_data(j).irq_resched_count, 10);
>  	seq_printf(p, "     IPI rescheduling interrupts\n");
> -	seq_printf(p, "CAL: ");
> +	seq_printf(p, "CAL:");
>  	for_each_online_cpu(j)
> -		seq_printf(p, "%10u ", cpu_data(j).irq_call_count);
> +		seq_put_decimal_ull_width(p, " ", cpu_data(j).irq_call_count, 10);
>  	seq_printf(p, "     IPI function call interrupts\n");
>  #endif
> -	seq_printf(p, "NMI: ");
> +	seq_printf(p, "NMI:");
>  	for_each_online_cpu(j)
> -		seq_printf(p, "%10u ", cpu_data(j).counter);
> +		seq_put_decimal_ull_width(p, " ", cpu_data(j).counter, 10);
>  	seq_printf(p, "     Non-maskable interrupts\n");
>  	return 0;
>  }
> diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c
> index 01ee800efde3..9ab6e79b617b 100644
> --- a/arch/sparc/kernel/irq_64.c
> +++ b/arch/sparc/kernel/irq_64.c
> @@ -304,9 +304,9 @@ int arch_show_interrupts(struct seq_file *p, int prec)
>  {
>  	int j;
>  
> -	seq_printf(p, "NMI: ");
> +	seq_printf(p, "NMI:");
>  	for_each_online_cpu(j)
> -		seq_printf(p, "%10u ", cpu_data(j).__nmi_count);
> +		seq_put_decimal_ull_width(p, " ", cpu_data(j).__nmi_count, 10);
>  	seq_printf(p, "     Non-maskable interrupts\n");
>  	return 0;
>  }

Reviewed-by: Andreas Larsson <andreas@gaisler.com>
Tested-by: Andreas Larsson <andreas@gaisler.com>

Picking this up to my for-next.

Thanks,
Andreas

      reply	other threads:[~2025-01-17 15:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-08 16:11 David Wang
2025-01-17 15:28 ` Andreas Larsson [this message]

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=69e24f81-c9fd-4815-b803-c6d094b84e9d@gaisler.com \
    --to=andreas@gaisler.com \
    --cc=00107082@163.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sparclinux@vger.kernel.org \
    /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®