public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Jan Beulich <JBeulich@novell.com>
Cc: "mingo@elte.hu" <mingo@elte.hu>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	Ky Srinivasan <KSrinivasan@novell.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"hpa@zytor.com" <hpa@zytor.com>
Subject: Re: [PATCH 2/4, v2] x86: enlightenment for ticket spin locks -	 Xen implementation
Date: Wed, 30 Jun 2010 16:25:21 +0200	[thread overview]
Message-ID: <4C2B53D1.90101@goop.org> (raw)
In-Reply-To: <4C2B6AD60200007800008D90@vpn.id2.novell.com>

On 06/30/2010 04:03 PM, Jan Beulich wrote:
>>>> On 30.06.10 at 15:23, Jeremy Fitzhardinge <jeremy@goop.org> wrote:
>>>>         
>> For spinlocks, the pvop calls should only be in the slow case: when a
>> spinlock has been spinning for long enough, and on unlock when there's
>> someone waiting for the lock.  The fastpath (no contention lock and
>> unlock) should have no extra calls.
>>     
> Then what was all that performance regression noise concerning
> pvops spinlocks about, leading to CONFIG_PARAVIRT_SPINLOCKS
> being separated from the base CONFIG_PARAVIRT?
>   

Nobody knows.  The pv spinlocks appeared to cause a 5% performance
regression on some benchmarks, which is wildly huge.  It appears to
trigger some kind of microarchitectural catastrophe on some Intel cpus,
perhaps relating to the extra call in the path or something.
 
> Afaics the unlock still involves a function call *in all cases* with
> pvops spinlocks, whereas it's a single inline instruction without.
>   

No.  The unlock path can see if there are any further waiters by looking
at the ticket in the, and only do the kick call if there are some.

    J

  reply	other threads:[~2010-06-30 14:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-29 14:32 [PATCH 2/4, v2] x86: enlightenment for ticket spin locks - Xen implementation Jan Beulich
2010-06-30  8:05 ` Peter Zijlstra
2010-06-30  8:52   ` Jan Beulich
2010-06-30  8:56     ` Peter Zijlstra
2010-06-30  9:04       ` Jan Beulich
2010-06-30 10:07 ` Jeremy Fitzhardinge
2010-06-30 11:31   ` Jan Beulich
2010-06-30 13:23     ` Jeremy Fitzhardinge
2010-06-30 14:03       ` Jan Beulich
2010-06-30 14:25         ` Jeremy Fitzhardinge [this message]
2010-06-30 14:36           ` Jan Beulich
2010-06-30 14:42             ` Jeremy Fitzhardinge
2010-06-30 22:14       ` H. Peter Anvin
2010-07-05 23:12         ` Jeremy Fitzhardinge
2010-06-30 15:57   ` Stefano Stabellini
2010-07-01  7:57     ` Jan Beulich
2010-07-01 11:39       ` Stefano Stabellini

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=4C2B53D1.90101@goop.org \
    --to=jeremy@goop.org \
    --cc=JBeulich@novell.com \
    --cc=KSrinivasan@novell.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tglx@linutronix.de \
    /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