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, 28 May 2012 23:30:32 -0400
From:	Kent Overstreet <koverstreet@...gle.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	linux-kernel@...r.kernel.org, linux-bcache@...r.kernel.org,
	axboe@...nel.dk, paul.gortmaker@...driver.com
Subject: Re: [PATCH 0/3] Generic rb tree code

On Tue, May 29, 2012 at 08:22:46AM +0900, Tejun Heo wrote:
> On Fri, May 25, 2012 at 01:57:38PM -0700, Kent Overstreet wrote:
> > Right now, users of the rb tree code have to open code their own search and
> > insert functions. This provides generic versions that you pass a comparison
> > function to.
> > 
> > I highly doubt the extra function calls are going to have a measurable
> > performance impact in practice - the pointer chasing is going to dominate. I
> > did provide inline versions just in case, though - it's modelled after the
> > spinlock code.
> 
> Modeled after spinlock code how?  AFAICS, spinlock code doesn't
> present inline and !inline versions to users. 

That probably wasn't intended, but it's how it works out.
__raw_spin_lock() and all the variants are defined as inline functions,
and then depending on whether CONFIG_INLINE_BLAH is enabled
_raw_spin_lock_blah() is defined to __raw_spin_lock_blah(), otherwise
_raw_spin_lock_blah() is a wrapper in a .c file.

But the end result is that the inline versions are also available.

> All the current users
> are inline anyway, why not just provide inlined versions and worry
> about whether inlining is beneifical in a separate patch?

Yeah, possible. I think it's only going to be an issue for rb_search()
in practice (since rb_search needs the stack allocated search argument),
should probably just drop the inline version of rb_insert().
--
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