From: Anthony Liguori <aliguori@linux.vnet.ibm.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Chris Wright <chrisw@sous-sol.org>,
kvm@vger.kernel.org, Avi Kivity <avi@redhat.com>,
Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Subject: Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)
Date: Thu, 02 Dec 2010 16:27:56 -0600 [thread overview]
Message-ID: <4CF81D6C.6070202@linux.vnet.ibm.com> (raw)
In-Reply-To: <20101202204016.GB31316@amt.cnet>
On 12/02/2010 02:40 PM, Marcelo Tosatti wrote:
> Consuming the timeslice outside guest mode is less intrusive and easier
> to replace. Something like this should work?
>
> if (vcpu->arch.mp_state == KVM_MP_STATE_HALTED) {
> while (!need_resched())
> default_idle();
> }
>
> But you agree this is no KVM business.
>
My initial inclination is that this would be inappropriate for KVM but I
think I'm slowly convincing myself otherwise.
Ultimately, hard limits and deterministic scheduling are related goals
but not quite the same. A hard limit is very specific, you want to
receive no more than an exit amount of CPU time per VCPU With
deterministic scheduling, you want to make sure that a set of VMs are
not influenced by each other's behavior.
You want hard limits when you want to hide the density/capacity of a
node from the end customer. You want determinism when you simply want
to isolate the performance of each customer from the other customers.
That is, the only thing that should affect the performance graph of a VM
is how many neighbors it has (which is controlled by management
software) rather than what its neighbors are doing.
If you have hard limits, you can approximate deterministic scheduling
but it's complex in the face of changing numbers of guests.
Additionally, hard limits present issues with directed yield that don't
exist with a deterministic scheduling approach.
You can still donate your time slice to another VCPU because the VCPUs
are not actually capped. That may mean that an individual VCPU gets
more PCPU time than an exact division but for the VM overall, it won't
get more than it's total share. So the principle of performance
isolation for the guest isn't impacted.
Regards,
Anthony Liguori
next prev parent reply other threads:[~2010-12-02 22:28 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-02 13:59 [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2) Anthony Liguori
2010-12-02 14:39 ` lidong chen
2010-12-02 15:23 ` Anthony Liguori
2010-12-02 15:23 ` Anthony Liguori
2010-12-03 9:38 ` Avi Kivity
2010-12-03 11:12 ` Srivatsa Vaddagiri
2010-12-03 23:28 ` Anthony Liguori
2010-12-02 17:37 ` Marcelo Tosatti
2010-12-02 19:07 ` Anthony Liguori
2010-12-02 20:12 ` Marcelo Tosatti
2010-12-02 20:51 ` Anthony Liguori
2010-12-03 9:36 ` Avi Kivity
2010-12-03 22:45 ` Anthony Liguori
2010-12-04 8:13 ` Avi Kivity
2010-12-04 13:30 ` Anthony Liguori
2010-12-06 8:28 ` Avi Kivity
2010-12-06 8:35 ` Avi Kivity
2010-12-06 13:58 ` Anthony Liguori
2010-12-06 14:01 ` Avi Kivity
2010-12-06 14:02 ` Avi Kivity
2010-12-06 14:08 ` Anthony Liguori
2010-12-06 14:14 ` Gleb Natapov
2010-12-06 14:03 ` Anthony Liguori
2010-12-06 14:33 ` Avi Kivity
2010-12-06 15:07 ` Anthony Liguori
2010-12-06 15:16 ` Avi Kivity
2010-12-06 16:21 ` Anthony Liguori
2010-12-06 16:30 ` Avi Kivity
2010-12-06 16:33 ` Anthony Liguori
2010-12-03 12:40 ` Gleb Natapov
2010-12-03 23:31 ` Anthony Liguori
2010-12-03 22:42 ` Anthony Liguori
2010-12-04 8:16 ` Avi Kivity
2010-12-04 13:48 ` Anthony Liguori
2010-12-06 8:32 ` Avi Kivity
2010-12-02 19:14 ` Chris Wright
2010-12-02 20:25 ` Anthony Liguori
2010-12-02 20:40 ` Chris Wright
2010-12-02 20:40 ` Marcelo Tosatti
2010-12-02 21:07 ` Chris Wright
2010-12-02 22:37 ` Anthony Liguori
2010-12-03 2:42 ` Chris Wright
2010-12-03 3:21 ` Anthony Liguori
2010-12-03 3:44 ` Chris Wright
2010-12-03 14:25 ` Anthony Liguori
2010-12-02 22:27 ` Anthony Liguori [this message]
2010-12-03 22:49 ` Anthony Liguori
2010-12-04 5:43 ` Srivatsa Vaddagiri
2010-12-03 9:40 ` Avi Kivity
2010-12-03 11:21 ` Srivatsa Vaddagiri
2010-12-03 11:57 ` Srivatsa Vaddagiri
2010-12-03 16:27 ` Srivatsa Vaddagiri
2010-12-03 17:29 ` Chris Wright
2010-12-03 17:33 ` Srivatsa Vaddagiri
2010-12-04 8:18 ` Avi Kivity
2010-12-03 17:57 ` Srivatsa Vaddagiri
2010-12-03 17:58 ` Chris Wright
2010-12-03 18:07 ` Anthony Liguori
2010-12-03 18:12 ` Srivatsa Vaddagiri
2010-12-04 8:19 ` Avi Kivity
2010-12-03 18:20 ` Chris Wright
2010-12-03 18:55 ` Anthony Liguori
2010-12-03 18:10 ` Marcelo Tosatti
2010-12-03 18:24 ` Marcelo Tosatti
2010-12-03 17:28 ` Chris Wright
2010-12-03 17:36 ` Srivatsa Vaddagiri
2010-12-03 17:38 ` Chris Wright
2010-12-03 17:43 ` Srivatsa Vaddagiri
2010-12-03 17:47 ` Anthony Liguori
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=4CF81D6C.6070202@linux.vnet.ibm.com \
--to=aliguori@linux.vnet.ibm.com \
--cc=avi@redhat.com \
--cc=chrisw@sous-sol.org \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--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