From: Avi Kivity <avi@redhat.com>
To: vatsa@linux.vnet.ibm.com
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
kvm@vger.kernel.org, Mike Galbraith <efault@gmx.de>,
qemu-devel@nongnu.org, Chris Wright <chrisw@sous-sol.org>,
Anthony Liguori <aliguori@linux.vnet.ibm.com>
Subject: [Qemu-devel] Re: [PATCH] qemu-kvm: response to SIGUSR1 to start/stop a VCPU (v2)
Date: Thu, 02 Dec 2010 11:14:49 +0200 [thread overview]
Message-ID: <4CF76389.2050305@redhat.com> (raw)
In-Reply-To: <20101201172953.GF8073@linux.vnet.ibm.com>
On 12/01/2010 07:29 PM, Srivatsa Vaddagiri wrote:
> > > > A plain yield (ignoring no-opiness on Linux) will penalize the
> > > > running guest wrt other guests. We need to maintain fairness.
>
> Avi, any idea how much penalty are we talking of here in using plain yield?
> If that is acceptable in practice, I'd prefer we use the plain yield rather than
> add any more sophistication to it ..
The first issue with plain yield is that it's a no-op unless some ioctl
is enabled. It's simply not very meaningful for CFS. That's why the
current PLE implementation uses sleep() (which is incredibly sucky in
another way).
Even if we do get yield() to work, giving up a timeslice will cause a
contending guest to lose way more than its fair share. Consider a lock
that is held for 100us every 500us; if each time we detect contention we
give up a 3ms timeslice, the guest will grind down to a halt while other
guests will happily use its timeslice. With directed yield, the guest
continues to run; and any excess time we donated to a vcpu is preserved.
> > The Xen paravirt spinlock solution is relatively sane, use that.
> > Unmodified guests suck anyway, there's really nothing much sane you can
> > do there as you don't know who owns what lock.
>
> Hopefully we don't have to deal with unmodified guests for too long.
> Till that time, plain yield() upon lock-contention seems like the best option
> we have for such unmodified guests.
We will have to deal with unmodified guests forever. Both older Linux
and Windows.
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2010-12-02 14:58 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-23 16:49 [Qemu-devel] [PATCH] qemu-kvm: response to SIGUSR1 to start/stop a VCPU (v2) Anthony Liguori
2010-11-23 19:35 ` Blue Swirl
2010-11-23 21:46 ` Anthony Liguori
2010-11-23 23:43 ` Paolo Bonzini
2010-11-24 1:15 ` Anthony Liguori
2010-11-24 2:08 ` Paolo Bonzini
2010-11-24 8:18 ` [Qemu-devel] " Avi Kivity
2010-11-24 13:58 ` Anthony Liguori
2010-11-24 14:23 ` Avi Kivity
2010-12-01 12:37 ` Srivatsa Vaddagiri
2010-12-01 12:56 ` Avi Kivity
2010-12-01 16:12 ` Srivatsa Vaddagiri
2010-12-01 16:25 ` Peter Zijlstra
2010-12-01 17:17 ` Chris Wright
2010-12-01 17:22 ` Peter Zijlstra
2010-12-01 17:26 ` Rik van Riel
2010-12-01 19:07 ` Peter Zijlstra
2010-12-01 19:24 ` Rik van Riel
2010-12-01 19:35 ` Peter Zijlstra
2010-12-01 19:42 ` Rik van Riel
2010-12-01 19:47 ` Peter Zijlstra
2010-12-02 9:07 ` Avi Kivity
2010-12-01 17:46 ` Chris Wright
2010-12-01 17:29 ` Srivatsa Vaddagiri
2010-12-01 17:45 ` Peter Zijlstra
2010-12-01 18:00 ` Srivatsa Vaddagiri
2010-12-01 19:09 ` Peter Zijlstra
2010-12-02 9:17 ` Avi Kivity
2010-12-02 11:47 ` Srivatsa Vaddagiri
2010-12-02 12:22 ` Srivatsa Vaddagiri
2010-12-02 12:41 ` Avi Kivity
2010-12-02 13:13 ` Srivatsa Vaddagiri
2010-12-02 13:49 ` Avi Kivity
2010-12-02 15:27 ` Srivatsa Vaddagiri
2010-12-02 15:28 ` Srivatsa Vaddagiri
2010-12-02 15:33 ` Avi Kivity
2010-12-02 15:44 ` Srivatsa Vaddagiri
2010-12-02 12:19 ` Srivatsa Vaddagiri
2010-12-02 12:42 ` Avi Kivity
2010-12-02 9:14 ` Avi Kivity [this message]
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=4CF76389.2050305@redhat.com \
--to=avi@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=aliguori@linux.vnet.ibm.com \
--cc=chrisw@sous-sol.org \
--cc=efault@gmx.de \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=vatsa@linux.vnet.ibm.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).