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: <20080310062944.GA31542@elte.hu>
Date:	Mon, 10 Mar 2008 07:29:45 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Alexander van Heukelum <heukelum@...tmail.fm>
Cc:	Alexander van Heukelum <heukelum@...lshack.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86: Change x86 to use generic find_next_bit


* Alexander van Heukelum <heukelum@...tmail.fm> wrote:

> > ok, that's rather convincing.
> > 
> > the generic version in lib/find_next_bit.c is open-coded C which gcc 
> > can optimize pretty nicely.
> > 
> > the hand-coded assembly versions in arch/x86/lib/bitops_32.c mostly 
> > use the special x86 'bit search forward' (BSF) instruction - which i 
> > know from the days when the scheduler relied on it has some 
> > non-trivial setup costs. So especially when there's _small_ bitmasks 
> > involved, it's more expensive.
> 
> Hi,
> 
> BSF is fine, it doesn't need any special setup. [...]

under "setup costs" i mean cycles spent by the CPU itself - the 
instruction itself is simple (of course) and needs no setup. If you look 
at BSF performance you'll see that it has nontrivial overhead.

	Ingo
--
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