From: David Howells <dhowells@redhat.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: lkml <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
Arjan van de Ven <arjan@infradead.org>,
Nicolas Pitre <nico@cam.org>,
Jes Sorensen <jes@trained-monkey.org>,
Al Viro <viro@ftp.linux.org.uk>, Oleg Nesterov <oleg@tv-sign.ru>,
David Howells <dhowells@redhat.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Christoph Hellwig <hch@infradead.org>, Andi Kleen <ak@suse.de>,
Russell King <rmk+lkml@arm.linux.org.uk>
Subject: Re: [patch 00/19] mutex subsystem, -V11
Date: Tue, 03 Jan 2006 15:07:17 +0000 [thread overview]
Message-ID: <16604.1136300837@warthog.cambridge.redhat.com> (raw)
In-Reply-To: <20060103100632.GA23154@elte.hu>
Ingo Molnar <mingo@elte.hu> wrote:
> this is version -V11 of the generic mutex subsystem, against v2.6.15.
When compiling for x86 with no mutex debugging, I see:
(gdb) disas mutex_lock
Dump of assembler code for function mutex_lock:
0xc02950d0 <mutex_lock+0>: lock decl (%eax)
0xc02950d3 <mutex_lock+3>: js 0xc02950ef <.text.lock.mutex>
0xc02950d5 <mutex_lock+5>: ret
End of assembler dump.
(gdb) disas 0xc02950ef
Dump of assembler code for function .text.lock.mutex:
0xc02950ef <.text.lock.mutex+0>: call 0xc0294ffb <__mutex_lock_noinline>
0xc02950f4 <.text.lock.mutex+5>: jmp 0xc02950d5 <mutex_lock+5>
0xc02950f6 <.text.lock.mutex+7>: call 0xc029509f <__mutex_unlock_noinline>
0xc02950fb <.text.lock.mutex+12>: jmp 0xc02950db <mutex_unlock+5>
End of assembler dump.
Can you arrange .text.lock.mutex+0 here to just jump directly to
__mutex_lock_noinline? Otherwise we have an unnecessarily extended return
path.
You may not want to make the JS go directly there, but you could have that go
to a JMP to __mutex_lock_noinline rather than having a CALL followed by a JMP
back to a return instruction.
Admittedly, this may not be possible, as you're mixing up C and ASM, but it
would speed things up a little.
David
next prev parent reply other threads:[~2006-01-03 15:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-03 10:06 Ingo Molnar
2006-01-03 15:07 ` David Howells [this message]
2006-01-03 15:14 ` Arjan van de Ven
2006-01-05 13:44 ` David Howells
2006-01-05 16:48 ` Linus Torvalds
2006-01-03 15:55 ` David Howells
2006-01-03 15:58 ` Ingo Molnar
2006-01-03 16:16 ` [PATCH] Add synchronisation primitive testing module David Howells
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=16604.1136300837@warthog.cambridge.redhat.com \
--to=dhowells@redhat.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arjan@infradead.org \
--cc=hch@infradead.org \
--cc=jes@trained-monkey.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nico@cam.org \
--cc=oleg@tv-sign.ru \
--cc=rmk+lkml@arm.linux.org.uk \
--cc=torvalds@osdl.org \
--cc=viro@ftp.linux.org.uk \
/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
Powered by JetHome