From: Peter Zijlstra <peterz@infradead.org>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>,
the arch/x86 maintainers <x86@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Nick Piggin <npiggin@kernel.dk>, Avi Kivity <avi@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>, KVM <kvm@vger.kernel.org>,
Andi Kleen <andi@firstfloor.org>,
Xen Devel <xen-devel@lists.xensource.com>,
Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Subject: Re: [PATCH RFC V5 00/11] Paravirtualized ticketlocks
Date: Thu, 13 Oct 2011 12:54:05 +0200 [thread overview]
Message-ID: <1318503245.24856.12.camel@twins> (raw)
In-Reply-To: <cover.1318466916.git.jeremy.fitzhardinge@citrix.com>
On Wed, 2011-10-12 at 17:51 -0700, Jeremy Fitzhardinge wrote:
>
> This is is all unnecessary complication if you're not using PV ticket
> locks, it also uses the jump-label machinery to use the standard
> "add"-based unlock in the non-PV case.
>
> if (TICKET_SLOWPATH_FLAG &&
> unlikely(static_branch(¶virt_ticketlocks_enabled))) {
> arch_spinlock_t prev;
>
> prev = *lock;
> add_smp(&lock->tickets.head, TICKET_LOCK_INC);
>
> /* add_smp() is a full mb() */
>
> if (unlikely(lock->tickets.tail & TICKET_SLOWPATH_FLAG))
> __ticket_unlock_slowpath(lock, prev);
> } else
> __add(&lock->tickets.head, TICKET_LOCK_INC, UNLOCK_LOCK_PREFIX);
Not that I mind the jump_label usage, but didn't paravirt have an
existing alternative() thingy to do things like this? Or is the
alternative() stuff not flexible enough to express this?
next prev parent reply other threads:[~2011-10-13 10:54 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-13 0:51 [PATCH RFC V5 00/11] Paravirtualized ticketlocks Jeremy Fitzhardinge
2011-10-13 0:51 ` [PATCH RFC V5 01/11] x86/spinlock: replace pv spinlocks with pv ticketlocks Jeremy Fitzhardinge
2011-10-13 0:51 ` [PATCH RFC V5 02/11] x86/ticketlock: don't inline _spin_unlock when using paravirt spinlocks Jeremy Fitzhardinge
2011-10-13 0:51 ` [PATCH RFC V5 03/11] x86/ticketlock: collapse a layer of functions Jeremy Fitzhardinge
2011-10-13 0:51 ` [PATCH RFC V5 04/11] xen: defer spinlock setup until boot CPU setup Jeremy Fitzhardinge
2011-10-13 0:51 ` [PATCH RFC V5 05/11] xen/pvticketlock: Xen implementation for PV ticket locks Jeremy Fitzhardinge
2011-10-13 0:51 ` [PATCH RFC V5 06/11] xen/pvticketlocks: add xen_nopvspin parameter to disable xen pv ticketlocks Jeremy Fitzhardinge
2011-10-13 0:51 ` [PATCH RFC V5 07/11] x86/pvticketlock: use callee-save for lock_spinning Jeremy Fitzhardinge
2011-10-13 0:51 ` [PATCH RFC V5 08/11] x86/pvticketlock: when paravirtualizing ticket locks, increment by 2 Jeremy Fitzhardinge
2011-10-13 0:51 ` [PATCH RFC V5 09/11] x86/ticketlock: add slowpath logic Jeremy Fitzhardinge
2011-10-13 0:51 ` [PATCH RFC V5 10/11] xen/pvticketlock: allow interrupts to be enabled while blocking Jeremy Fitzhardinge
2011-10-13 0:51 ` [PATCH RFC V5 11/11] xen: enable PV ticketlocks on HVM Xen Jeremy Fitzhardinge
2011-10-13 10:54 ` Peter Zijlstra [this message]
2011-10-13 16:44 ` [PATCH RFC V5 00/11] Paravirtualized ticketlocks Jeremy Fitzhardinge
2011-10-14 14:17 ` Jason Baron
2011-10-14 17:02 ` Jeremy Fitzhardinge
2011-10-14 18:35 ` Jason Baron
2011-10-14 18:38 ` H. Peter Anvin
2011-10-14 18:51 ` Jeremy Fitzhardinge
2011-10-14 19:02 ` Jeremy Fitzhardinge
2011-10-17 14:58 ` Jason Baron
2011-10-14 18:37 ` H. Peter Anvin
2011-10-14 19:10 ` Jeremy Fitzhardinge
2011-10-14 19:12 ` H. Peter Anvin
2011-10-17 16:33 ` H. Peter Anvin
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=1318503245.24856.12.camel@twins \
--to=peterz@infradead.org \
--cc=andi@firstfloor.org \
--cc=avi@redhat.com \
--cc=hpa@zytor.com \
--cc=jeremy.fitzhardinge@citrix.com \
--cc=jeremy@goop.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mtosatti@redhat.com \
--cc=npiggin@kernel.dk \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xensource.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;
as well as URLs for NNTP newsgroup(s).