xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Mukesh Rathor <mukesh.rathor@oracle.com>
To: Jan Beulich <JBeulich@novell.com>
Cc: "Xen-devel@lists.xensource.com" <Xen-devel@lists.xensource.com>
Subject: Re: Linux spin lock enhancement on xen
Date: Tue, 17 Aug 2010 18:58:16 -0700	[thread overview]
Message-ID: <20100817185816.6c31ab7e@mantra.us.oracle.com> (raw)
In-Reply-To: <4C6A5C1C02000078000104D1@vpn.id2.novell.com>

On Tue, 17 Aug 2010 08:53:32 +0100
"Jan Beulich" <JBeulich@novell.com> wrote:

> >>> On 17.08.10 at 03:33, Mukesh Rathor <mukesh.rathor@oracle.com>
> >>> wrote:
> 
> A mere vcpu_kick()+do_yield() seems pretty simplistic to me - if the
> current vCPU still has higher priority than the one kicked you'll
> achieve nothing. Instead, I think you really want to offer the
> current vCPU's time slice to the target, making sure the target
> yields back as soon as it released the lock (thus transferring the
> borrowed time slice back to where it belongs).

True, that is phase II enhancement.

> And then, without using ticket locks, you likely increase unfairness
> (as any other actively running vCPU going for the same lock will
> have much better chances of acquiring it than the vCPU that
> originally tried to and yielded), including the risk of starvation.

Please see other thread on my thoughts on this.

> Still, I'm glad to see we're not the only ones wanting a directed
> yield capability in Xen.
> 
> >+struct sched_yield_to {
> >+    unsigned int version;
> >+    unsigned int vcpu_id;
> >+};
> 
> Why do you need a version field here, the more as it doesn't
> appear to get read by the hypervisor.

No reason, just forgot to remove it.

thanks,
Mukesh

  reply	other threads:[~2010-08-18  1:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-17  1:33 Linux spin lock enhancement on xen Mukesh Rathor
2010-08-17  7:33 ` Keir Fraser
2010-08-17  7:53 ` Jan Beulich
2010-08-18  1:58   ` Mukesh Rathor [this message]
2010-08-17 14:34 ` Ky Srinivasan
2010-08-18  1:58   ` Mukesh Rathor
2010-08-17 17:43 ` Jeremy Fitzhardinge
2010-08-18  1:58   ` Mukesh Rathor
2010-08-18 16:37     ` Jeremy Fitzhardinge
2010-08-18 17:09       ` Keir Fraser
2010-08-19  2:52         ` Mukesh Rathor
2010-08-24  8:08         ` George Dunlap
2010-08-24  8:20           ` Keir Fraser
2010-08-24  8:43             ` George Dunlap
2010-08-24  8:48             ` Jan Beulich
2010-08-24  9:09               ` George Dunlap
2010-08-24 13:25                 ` Jan Beulich
2010-08-24 16:11                   ` George Dunlap
2010-08-26 14:08                     ` Tim Deegan
2010-08-25  1:03           ` Dong, Eddie
2010-08-26  2:13           ` Mukesh Rathor
2010-08-19  2:52       ` Mukesh Rathor
2010-08-23 21:33         ` Jeremy Fitzhardinge

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=20100817185816.6c31ab7e@mantra.us.oracle.com \
    --to=mukesh.rathor@oracle.com \
    --cc=JBeulich@novell.com \
    --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;
as well as URLs for NNTP newsgroup(s).