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]
Date:	Mon, 9 Dec 2013 20:13:50 +0100
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Joe Perches <joe@...ches.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] softirq: Use ffs in __do_softirq

On Mon, Dec 09, 2013 at 10:56:46AM -0800, Joe Perches wrote:
> On Mon, 2013-12-09 at 19:44 +0100, Frederic Weisbecker wrote:
> > On Sun, Nov 17, 2013 at 01:55:10AM -0800, Joe Perches wrote:
> > > Possible speed improvement of the __do_softirq function by using ffs
> > > instead of using a while loop with an & 1 test then single bit shift.
> []
> > Perhaps using for_each_set_bit() would simplify that more?
> 
> It might simplify the appearance of the code but it
> would/could expand the amount of generated code because
> for_each_set_bit uses an address_of(unsigned long) and
> the value tested is an unsigned int.
> 
> extra dereferences, can't be in a register, etc...

I'm not sure that would matter that much. But yeah it appears that find_first_bit/find_next_bit
aren't even overriden in x86. So they are function calls. Although I guess that most
of the time only one softirq is pending at a time.

But anyway perhaps we want that path to stay very optimized, so you're
patch look ok.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ