From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: virtualization@lists.linux-foundation.org,
Nick Piggin <nickpiggin@yahoo.com.au>,
Jens Axboe <axboe@kernel.dk>,
Xen devel <xen-devel@lists.xensource.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Christoph Lameter <clameter@linux-foundation.org>,
Petr Tesarik <ptesarik@suse.cz>,
LKML <linux-kernel@vger.kernel.org>,
Thomas Friebel <thomas.friebel@amd.com>,
Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH RFC 0/4] Paravirtual spinlocks
Date: Mon, 07 Jul 2008 17:37:54 -0700 [thread overview]
Message-ID: <4872B6E2.5080003@goop.org> (raw)
In-Reply-To: <200807081029.19242.rusty@rustcorp.com.au>
Rusty Russell wrote:
> On Tuesday 08 July 2008 05:07:49 Jeremy Fitzhardinge wrote:
>
>> At the most recent Xen Summit, Thomas Friebel presented a paper
>> ("Preventing Guests from Spinning Around",
>> http://xen.org/files/xensummitboston08/LHP.pdf) investigating the
>> interactions between spinlocks and virtual machines. Specifically, he
>> looked at what happens when a lock-holding VCPU gets involuntarily
>> preempted.
>>
>
> I find it interesting that gang scheduling the guest was not suggested as an
> obvious solution.
>
It's an obvious answer, but not an obvious solution. You trade off
wasting time spinning vs wasting time waiting for N vcpus to be free for
scheduling. Or something; seems much more complex, particularly if you
can do a small guest tweak to solve the problem.
> Anyway, concept looks fine; lguest's solution is more elegant of course :)
>
You could remove all mutable state and call it "erlang".
> A little disappointing that you can't patch your version inline.
Spinlock code isn't inlined currently, so I hadn't considered it. The
fast path code for both lock and unlock is nearly small enough to
consider it, but it seems a bit fiddly.
If the "spin_lock" and "spin_unlock" functions were inlined functions
which called the out of line __raw_spin_lock/unlock functions, then
after patching they would result in a direct call to the backend lock
functions, which would be exactly equivalent to what happens now (since
I hook __raw_spin_lock into calls via pv_lock_ops).
J
next prev parent reply other threads:[~2008-07-08 0:38 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-07 19:07 [PATCH RFC 0/4] Paravirtual spinlocks Jeremy Fitzhardinge
2008-07-07 19:07 ` [PATCH RFC 1/4] x86/paravirt: add hooks for spinlock operations Jeremy Fitzhardinge
2008-07-07 19:07 ` [PATCH RFC 2/4] paravirt: introduce a "lock-byte" spinlock implementation Jeremy Fitzhardinge
2008-07-07 19:07 ` [PATCH RFC 3/4] xen: use lock-byte " Jeremy Fitzhardinge
2008-07-07 19:07 ` [PATCH RFC 4/4] xen: implement Xen-specific spinlocks Jeremy Fitzhardinge
2008-07-08 6:37 ` Johannes Weiner
2008-07-08 7:15 ` Jeremy Fitzhardinge
2008-07-08 7:30 ` Johannes Weiner
2008-07-08 0:29 ` [PATCH RFC 0/4] Paravirtual spinlocks Rusty Russell
2008-07-08 0:37 ` Jeremy Fitzhardinge [this message]
2008-07-08 1:01 ` Rusty Russell
2008-07-08 4:51 ` Nick Piggin
2008-07-08 5:28 ` Jeremy Fitzhardinge
2008-07-09 12:28 ` Ingo Molnar
2008-07-09 12:35 ` [patch] x86: paravirt spinlocks, !CONFIG_SMP build fixes (was: Re: [PATCH RFC 0/4] Paravirtual spinlocks) Ingo Molnar
2008-07-09 12:39 ` [patch] x86: paravirt spinlocks, modular build fix " Ingo Molnar
2008-07-09 13:33 ` [PATCH RFC 0/4] Paravirtual spinlocks Ingo Molnar
2008-07-09 13:49 ` [patch] x86, paravirt-spinlocks: fix boot hang (was: Re: [PATCH RFC 0/4] Paravirtual spinlocks) Ingo Molnar
2008-07-09 15:55 ` [patch] x86, paravirt-spinlocks: fix boot hang Jeremy Fitzhardinge
2008-07-09 19:26 ` Ingo Molnar
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=4872B6E2.5080003@goop.org \
--to=jeremy@goop.org \
--cc=a.p.zijlstra@chello.nl \
--cc=axboe@kernel.dk \
--cc=clameter@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nickpiggin@yahoo.com.au \
--cc=ptesarik@suse.cz \
--cc=rusty@rustcorp.com.au \
--cc=thomas.friebel@amd.com \
--cc=virtualization@lists.linux-foundation.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