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/
Home Products Support Community News


Re: [Xen-devel] Linux spin lock enhancement on xen

To: "Ky Srinivasan" <ksrinivasan@xxxxxxxxxx>
Subject: Re: [Xen-devel] Linux spin lock enhancement on xen
From: Mukesh Rathor <mukesh.rathor@xxxxxxxxxx>
Date: Tue, 17 Aug 2010 18:58:21 -0700
Cc: Jan, "Xen-devel@xxxxxxxxxxxxxxxxxxx" <Xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 17 Aug 2010 18:59:28 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C6A64F5.E57C.0030.1@xxxxxxxxxx>
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>
Organization: Oracle Corporation
References: <20100816183357.08623c4c@xxxxxxxxxxxxxxxxxxxx> <4C6A64F5.E57C.0030.1@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, 17 Aug 2010 08:34:49 -0600
"Ky Srinivasan" <ksrinivasan@xxxxxxxxxx> wrote:
> While I agree that a directed yield is a useful construct, I am not
> sure how this protocol would deal with ticket spin locks as you would
> want to implement some form of priority inheritance - if the vcpu you
> are yielding to is currently blocked on another (ticket) spin lock,
> you would want to yield to the owner of that other spin lock.
> Clearly, this dependency information is only available in the guest
> and that is where we would need to implement this logic. I think
> Jan's "enlightened" spin locks implemented this kind of logic.
Frankly, I'm opposed to ticket spin locks. IMO, starvation and fairness
are schedular problems and not of spin locks. If a vcpu has higher
priority, it is for a reason, and I'd like it to get prioritized.
Imagine a cluster stack in a 128 vcpu environment, the thread doing
heartbeat definitely needs the prirority it deserves.

Having said that, my proposal can be enhanced to take into
consideration ticket spin locks by having unlock make sure
next vcpu in line has temporary priority boost.


Xen-devel mailing list