WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH RFC 0/4] Paravirtual spinlocks

To: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH RFC 0/4] Paravirtual spinlocks
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Mon, 07 Jul 2008 17:37:54 -0700
Cc: Jens Axboe <axboe@xxxxxxxxx>, Nick Piggin <nickpiggin@xxxxxxxxxxxx>, Xen devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>, Christoph Lameter <clameter@xxxxxxxxxxxxxxxxxxxx>, Petr Tesarik <ptesarik@xxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx, Thomas Friebel <thomas.friebel@xxxxxxx>, Ingo Molnar <mingo@xxxxxxx>
Delivery-date: Mon, 07 Jul 2008 17:38:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200807081029.19242.rusty@xxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20080707190749.299430659@xxxxxxxx> <200807081029.19242.rusty@xxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.14 (X11/20080501)
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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>