From: Ingo Molnar <mingo@elte.hu>
To: Jan Beulich <JBeulich@novell.com>
Cc: tglx@linutronix.de, hpa@zytor.com,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Linus Torvalds <torvalds@linux-foundation.org>,
Nick Piggin <npiggin@suse.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: slightly shorten __ticket_spin_trylock() (v2)
Date: Thu, 3 Dec 2009 11:49:06 +0100 [thread overview]
Message-ID: <20091203104906.GC7628@elte.hu> (raw)
In-Reply-To: <4B179A6D0200007800023542@vpn.id2.novell.com>
* Jan Beulich <JBeulich@novell.com> wrote:
> Since the callers generally expect a boolean value, there's no need to
> zero-extend the outcome of the comparison. It just requires that all
> of x86' trylock implementations have their return type changed
> accordingly.
>
> Don't use bool for the return type though - this is being frowned on
> and presently doesn't work with the pv-ops patching macros.
>
> Signed-off-by: Jan Beulich <jbeulich@novell.com>
> Cc: Nick Piggin <npiggin@suse.de>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
>
> ---
> arch/x86/include/asm/paravirt.h | 4 ++--
> arch/x86/include/asm/paravirt_types.h | 2 +-
> arch/x86/include/asm/spinlock.h | 12 +++++-------
> arch/x86/xen/spinlock.c | 2 +-
> 4 files changed, 9 insertions(+), 11 deletions(-)
Looks much cleaner - and should give us pretty much the same savings as
the previous patch, right? (if not, do you have a size comparison?)
Ingo
next prev parent reply other threads:[~2009-12-03 10:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-03 10:01 Jan Beulich
2009-12-03 10:49 ` Ingo Molnar [this message]
2009-12-03 11:13 ` Jan Beulich
2009-12-03 21:10 ` Linus Torvalds
2009-12-11 15:32 ` Jan Beulich
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=20091203104906.GC7628@elte.hu \
--to=mingo@elte.hu \
--cc=JBeulich@novell.com \
--cc=a.p.zijlstra@chello.nl \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@suse.de \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/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®