public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Kent Overstreet <koverstreet@google.com>
Cc: linux-kernel@vger.kernel.org, linux-bcache@vger.kernel.org,
	axboe@kernel.dk, paul.gortmaker@windriver.com
Subject: Re: [PATCH 0/3] Generic rb tree code
Date: Tue, 29 May 2012 14:28:44 +0900	[thread overview]
Message-ID: <20120529052844.GB17366@google.com> (raw)
In-Reply-To: <20120529033032.GB10175@dhcp-172-18-216-138.mtv.corp.google.com>

Hello, Kent.

On Mon, May 28, 2012 at 11:30:32PM -0400, Kent Overstreet wrote:
> > 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.

Doesn't matter.  Nobody outside spinlock implementation proper should
be using them.

> > 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().

As long as there's single version of the thing....

Thanks.

-- 
tejun

  reply	other threads:[~2012-05-29  5:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-25 20:57 [PATCH 0/3] Generic rb tree code Kent Overstreet
2012-05-25 20:57 ` [PATCH 1/3] rbtree: Add rb_insert(), rb_search(), etc Kent Overstreet
2012-05-28 23:35   ` Tejun Heo
2012-05-25 20:57 ` [PATCH 2/3] timerqueue: convert to generic rb tree code Kent Overstreet
2012-05-25 20:57 ` [PATCH 3/3] block: convert elevator " Kent Overstreet
2012-05-28 23:17   ` Tejun Heo
2012-05-29  3:25     ` Kent Overstreet
2012-05-29  5:24       ` Tejun Heo
2012-05-29  6:57         ` Kent Overstreet
2012-05-28 23:22 ` [PATCH 0/3] Generic " Tejun Heo
2012-05-29  3:30   ` Kent Overstreet
2012-05-29  5:28     ` Tejun Heo [this message]
2012-05-31 21:03 ` Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120529052844.GB17366@google.com \
    --to=tj@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=koverstreet@google.com \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox