mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Jiri Kosina <jkosina@suse.cz>
Cc: Andi Kleen <andi@firstfloor.org>, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org
Subject: Re: spinlocks -- why are releases inlined and acquires are not?
Date: Tue, 1 Apr 2008 15:30:53 +0200	[thread overview]
Message-ID: <20080401133053.GJ29105@one.firstfloor.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0804011436150.5541@jikos.suse.cz>

On Tue, Apr 01, 2008 at 02:40:49PM +0200, Jiri Kosina wrote:
> On Tue, 1 Apr 2008, Andi Kleen wrote:
> 
> > At some point -- but that was before queued locks -- I noticed that for 
> > i386 spin unlocks the call sequence for the sub function is actually 
> > larger in code than the actual spin unlock operation and for x86-64 it 
> > was about the same. 
> 
> spin unlocks seem to be properly inlined anyway, so that should be fine. 
> My concern here is the non-inlining of spin locks, for which I don't think 
> your argument above is also valid, right?

When I did the original numbers (again before queued locks) the
call was slightly shorter than the actual spin lock operation.

This was not counting register allocator effects though which
are difficult to measure generally.

-Andi

      reply	other threads:[~2008-04-01 13:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-01  0:08 Jiri Kosina
2008-04-01  0:40 ` Jiri Kosina
2008-04-01  8:33   ` Ingo Molnar
2008-04-01  8:38     ` Jiri Kosina
2008-04-01  8:43       ` Ingo Molnar
2008-04-01  8:44         ` Jiri Kosina
2008-04-01 11:12       ` Andi Kleen
2008-04-01 12:40         ` Jiri Kosina
2008-04-01 13:30           ` Andi Kleen [this message]

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=20080401133053.GJ29105@one.firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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

all inboxes | Powered by JetHome®