lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a9fe22747f20cae9fcc9b9d20109e7afbf8e6b93.camel@physik.fu-berlin.de>
Date: Sat, 30 Nov 2024 13:44:26 +0100
From: John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>
To: David Wang <00107082@....com>, ysato@...rs.sourceforge.jp,
 dalias@...c.org
Cc: linux-kernel@...r.kernel.org, linux-sh@...r.kernel.org
Subject: Re: [PATCH 13/13] sh/irq: use seq_put_decimal_ull_width() for
 decimal values

Hi David,

On Sat, 2024-11-30 at 13:41 +0100, John Paul Adrian Glaubitz wrote:
> 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@....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?

I just checked existing merges of this patch for other architectures which include
a more elaborate patch description. If you could do that for SH as well, I can pick
the patch for v6.14.

Adrian

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ