public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: kvm@vger.kernel.org, Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Chris Wright <chrisw@sous-sol.org>
Subject: Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v4)
Date: Sun, 5 Dec 2010 22:25:13 +0530	[thread overview]
Message-ID: <20101205165513.GC440@linux.vnet.ibm.com> (raw)
In-Reply-To: <1291473801-23290-1-git-send-email-aliguori@us.ibm.com>

On Sat, Dec 04, 2010 at 08:43:21AM -0600, Anthony Liguori wrote:
> In certain use-cases, we want to allocate guests fixed time slices where idle
> guest cycles leave the machine idling.  There are many approaches to achieve
> this but the most direct is to simply avoid trapping the HLT instruction which
> lets the guest directly execute the instruction putting the processor to sleep.

A vcpu could be idle not just because of lack of work, but also because its
waiting on IO completion. Normally idle vcpus that yield would allow their
companion threads to run and possibly finish pending IO work faster. Now that
idle vcpu won't yield, it would cause overall cpu cycle demand of VMs to go up
(100% demand from VM's idle/not-idle vcpus + whatever their companion threads
demand) not to mention any impact on IO latencies. Not sure how much of an issue
this will be in practice, but something to keep in mind when we test!

Also, just curious how this would work for idle vcpus that use mwait rather 
than hlt.

- vatsa

  reply	other threads:[~2010-12-06  4:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-04 14:43 [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v4) Anthony Liguori
2010-12-05 16:55 ` Srivatsa Vaddagiri [this message]
2010-12-06 13:27   ` Avi Kivity
2010-12-06 13:39     ` Srivatsa Vaddagiri
2010-12-06 13:43       ` Avi Kivity

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=20101205165513.GC440@linux.vnet.ibm.com \
    --to=vatsa@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=chrisw@sous-sol.org \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.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