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:	Fri, 21 May 2010 11:33:00 +1000
From:	Nick Piggin <npiggin@...e.de>
To:	Manfred Spraul <manfred@...orfullife.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [patch 2/3] ipc: use shifts to extract seq/idx

On Thu, May 20, 2010 at 08:16:24PM +0200, Manfred Spraul wrote:
> On 05/20/2010 09:00 AM, Nick Piggin wrote:
> >All the ipc ids and sequences are signed integers, so power of 2
> >sequence multiplier does not work so well. Convert it to use shifts,
> >which improves generated code particularly in ipc_lock/ipc_lock_check
> >fast paths.
> >
> Have you checked the asm output?

Yep, it's quite improved (although this isn't a particularly hot
path I thought it is a good cleanup).


> I would expect that gcc auto-optimizes constant divides by power-of-two.

It can't with signed I guess.
--
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