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:	Thu, 19 Mar 2015 23:10:21 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	mingo@...nel.org, rusty@...tcorp.com.au,
	mathieu.desnoyers@...icios.com, oleg@...hat.com,
	paulmck@...ux.vnet.ibm.com, torvalds@...ux-foundation.org,
	linux-kernel@...r.kernel.org, andi@...stfloor.org,
	rostedt@...dmis.org, tglx@...utronix.de,
	Michel Lespinasse <walken@...gle.com>,
	Andrea Arcangeli <aarcange@...hat.com>,
	David Woodhouse <David.Woodhouse@...el.com>,
	Rik van Riel <riel@...hat.com>
Subject: Re: [PATCH 6/8] rbtree: Implement generic latch_tree

On Thu, Mar 19, 2015 at 01:58:33PM -0700, Andrew Morton wrote:
> On Thu, 19 Mar 2015 08:25:02 +0100 Peter Zijlstra <peterz@...radead.org> wrote:
> 
> > On Wed, Mar 18, 2015 at 10:14:46PM -0700, Andrew Morton wrote:
> > > On Wed, 18 Mar 2015 14:36:32 +0100 Peter Zijlstra <peterz@...radead.org> wrote:
> > > 
> > > >  include/linux/rbtree_latch.h |  223 +++++++++++++++++++++++++++++++++++++++++++
> > > 
> > > Did it really need to all be inlined?
> > 
> > Without that you get actual function calls to the less() and comp()
> > operators. This way GCC can inline the lot even though its function
> > pointers.
> > 
> > The typical RB tree user open-codes all this every single time.
> 
> Is it a good tradeoff?

Is what? Writing it like this or open-coding it all?

For many archs (indirect) function calls are far more expensive than the
typical comparison.
--
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