From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Jiri Kosina <jkosina@suse.cz>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>, linux-kernel@vger.kernel.org
Subject: Re: Does CONFIG_PARAVIRT imply usage of byte locks?
Date: Sun, 11 Jan 2009 10:53:57 +1100 [thread overview]
Message-ID: <49693515.5000106@goop.org> (raw)
In-Reply-To: <alpine.LNX.1.10.0901092253240.5377@jikos.suse.cz>
Jiri Kosina wrote:
> Hi,
>
> in [1] Linus states that CONFIG_PARAVIRT implies usage of inferior locks.
>
Yes, he's wrong about that. In the normal case, the CONFIG_PARAVIRT
case will continue to use the ticket-lock algorithm.
> Looking at the code, I wonder whether are we in fact really using byte
> locks in CONFIG_PARAVIRT situation? Where are we actually setting
> pv_lock_ops.spin_lock pointer to point to __byte_spin_lock?
>
> Such initialization seems to happen only in paravirt_use_bytelocks()
> function, but my blind eyes prevent me from finding a callsite from which
> this function would eventually get called.
>
> It seems to me that paravirt_use_bytelocks() is a dead code that gets
> never called, and the same applies to the implementations of write locks.
> What did I miss?
>
Probably nothing. Xen has its own optimised spinlock implementation,
and so doesn't use the plain byte locks. But ticket locks are awesomely
bad for any virtual environment which doesn't gang schedule VCPUs, so
the kvm folks would do well to at least consider using them.
J
next prev parent reply other threads:[~2009-01-10 23:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-09 21:58 Does CONFIG_PARAVIRT imply usage of byte locks? Jiri Kosina
2009-01-09 22:24 ` Jiri Kosina
2009-01-10 23:53 ` Jeremy Fitzhardinge [this message]
2009-01-11 22:52 ` Jiri Kosina
2009-01-12 7:14 ` Avi Kivity
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=49693515.5000106@goop.org \
--to=jeremy@goop.org \
--cc=jeremy@xensource.com \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.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