From: Emmanuel Ackaouy <ackaouy@gmail.com>
To: George Dunlap <gdunlap@xensource.com>
Cc: xen-devel@lists.xensource.com, John Levon <levon@movementarian.org>
Subject: Re: credit scheduler and HYPERVISOR_yield()
Date: Tue, 9 Oct 2007 16:48:42 +0200 [thread overview]
Message-ID: <368868960d399c52030f43aa3e74ff6f@gmail.com> (raw)
In-Reply-To: <de76405a0710090622x63a1c34exc7a14c391782211b@mail.gmail.com>
On Oct 9, 2007, at 15:22, George Dunlap wrote:
> What this means in the case of a yield(), unfortunately, is that If a
> given vcpu is the only vcpu on its processor with credits left, all it
> can do is burn up its extra credits spinning or calling yield() to no
> effect.
>
> A simple option would be, for the credit scheduler, to temporarily
> reduce the priority from TS_UNDER to TS_OVER. This will cause it to
> actually yield if there's any other vcpus that can run. The next time
> accounting is done, the priority will be reset, and it should get more
> time because of the time it's given up.
Temporarily changing the priority to TS_OVER strikes me as a
reasonable idea. However, changing it for an average of half of
the accounting period (1/2 100ms = 50ms) is hardly "temporary".
A VCPUs that would call yield() more than once every 50ms or
so -- which isn't unreasonable -- would never be able to run at
TS_UNDER. That would totally distort accounting fairness for
users of yield(). Maybe something more in the temporary spirit
of the TS_BOOST priority (but lower not higher than TS_UNDER)
would be better?
It may be worthwhile to consider if yield() can be replaced with
more intelligent mechanisms for VCPU synchronization of SMP
guests. In the case of ACKed IPIs for example, if all target VCPUs
are not running at the time of the IPI initiation, it might be a good
idea to put the source to sleep until all targets have ACKed.
If all target VCPUs are running though, I suspect things will work
best if the IPI initiator does not yield at all.
next prev parent reply other threads:[~2007-10-09 14:48 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 [this message]
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
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=368868960d399c52030f43aa3e74ff6f@gmail.com \
--to=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.