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: <AE90C24D6B3A694183C094C60CF0A2F6026B6FDE@saturn3.aculab.com>
Date:	Thu, 6 Sep 2012 15:36:52 +0100
From:	"David Laight" <David.Laight@...LAB.COM>
To:	"Sasha Levin" <levinsasha928@...il.com>,
	"Mathieu Desnoyers" <mathieu.desnoyers@...icios.com>
Cc:	"Pedro Alves" <palves@...hat.com>,
	"Steven Rostedt" <rostedt@...dmis.org>,
	"Tejun Heo" <tj@...nel.org>, <torvalds@...ux-foundation.org>,
	<akpm@...ux-foundation.org>, <linux-kernel@...r.kernel.org>,
	<linux-mm@...ck.org>, <paul.gortmaker@...driver.com>,
	<davem@...emloft.net>, <mingo@...e.hu>, <ebiederm@...ssion.com>,
	<aarcange@...hat.com>, <ericvh@...il.com>,
	<netdev@...r.kernel.org>, <josh@...htriplett.org>,
	<eric.dumazet@...il.com>, <axboe@...nel.dk>, <agk@...hat.com>,
	<dm-devel@...hat.com>, <neilb@...e.de>, <ccaulfie@...hat.com>,
	<teigland@...hat.com>, <Trond.Myklebust@...app.com>,
	<bfields@...ldses.org>, <fweisbec@...il.com>, <jesse@...ira.com>,
	<venkat.x.venkatsubra@...cle.com>, <ejt@...hat.com>,
	<snitzer@...hat.com>, <edumazet@...gle.com>,
	<linux-nfs@...r.kernel.org>, <dev@...nvswitch.org>,
	<rds-devel@....oracle.com>, <lw@...fujitsu.com>
Subject: RE: [PATCH v3 01/17] hashtable: introduce a small and naive hashtable

> My solution to making 'break' work in the iterator is:
> 
> 	for (bkt = 0, node = NULL; bkt < HASH_SIZE(name) && node ==
NULL; bkt++)
> 		hlist_for_each_entry(obj, node, &name[bkt], member)

I'd take a look at the generated code.
Might come out a bit better if the condition is changed to:
	node == NULL && bkt < HASH_SIZE(name)
you might find the compiler always optimises out the
node == NULL comparison.
(It might anyway, but switching the order gives it a better
chance.)

	David



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ