All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@xensource.com>
To: George Dunlap <gdunlap@xensource.com>
Cc: Emmanuel Ackaouy <ackaouy@gmail.com>,
	xen-devel@lists.xensource.com,
	John Levon <levon@movementarian.org>
Subject: Re: credit scheduler and HYPERVISOR_yield()
Date: Mon, 15 Oct 2007 13:43:40 +0100	[thread overview]
Message-ID: <20071015124340.GB15691@implementation.uk.xensource.com> (raw)
In-Reply-To: <de76405a0710150526g3b89513dx7bfc1c62c79ba996@mail.gmail.com>

Hi,

George Dunlap, le Mon 15 Oct 2007 13:26:06 +0100, a écrit :
> I can't really think of a situation where
> "yield-to-other-cpus-that-haven't-used-all-their-credits-yet" is
> particularly useful.  Can you think of an example?

That could actually be the counter part of "yield-I-really-mean-it":
- vCPU0 yields-really-means-it so as to hopefully schedule vCPU1
- vCPU1 realizes why it got scheduled, does the needed urging job.
- vCPU1 "yields-to-other-cpus-thatblabla", for letting Xen know it
  finished its urging job and usual priorities can be taken into account
  again.
- vCPU0 gets scheduled again because it actually had bigger priority.

> Here are some random ideas:
> * Expose to the guest, via the shared-info page, which vcpus are
> actively scheduled or not.

That could be useful, but one can't safely rely on it, since it may
change asynchronously.

> * Implement some kind of a yield or block primitive, like:
> + yield to a specific vcpu (i.e., the one holding the lock you want)

That should be quite fine.  Xen could use it as a strong scheduling
hint. If scheduling that vCPU immediately would break some quota rules
for instance, Xen could still remember that it shouldn't reschedule the
calling vCPU before having scheduled the target vCPU at least once.

> + block with a vcpu mask.  The vcpu will then be blocked until each of
> the vcpus in the mask has been scheduled at least once.

That could be also called yield_to_vcpus actually.

Samuel

  parent reply	other threads:[~2007-10-15 12:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-08 23:41 credit scheduler and HYPERVISOR_yield() John Levon
2007-10-09  1:23 ` Atsushi SAKAI
2007-10-09  1:42   ` John Levon
2007-10-09  7:06 ` Emmanuel Ackaouy
2007-10-09 12:15   ` John Levon
2007-10-09 13:22     ` George Dunlap
2007-10-09 14:48       ` Emmanuel Ackaouy
2007-10-14 18:45       ` John Levon
2007-10-14 19:20         ` Emmanuel Ackaouy
2007-10-14 19:49           ` John Levon
2007-10-14 21:25             ` Emmanuel Ackaouy
2007-10-14 21:50               ` John Levon
2007-10-15 12:26           ` George Dunlap
2007-10-15 12:32             ` John Levon
2007-10-15 12:43             ` Samuel Thibault [this message]
2007-10-15 17:13             ` Emmanuel Ackaouy
2007-10-15 17:45               ` Keir Fraser

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=20071015124340.GB15691@implementation.uk.xensource.com \
    --to=samuel.thibault@xensource.com \
    --cc=ackaouy@gmail.com \
    --cc=gdunlap@xensource.com \
    --cc=levon@movementarian.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.