From: Avi Kivity <avi@redhat.com>
To: Srivatsa Vaddagiri <vatsa.ml@gmail.com>
Cc: "Zhang, Xiantao" <xiantao.zhang@intel.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
Marcelo Tosatti <mtosatti@redhat.com>,
"Yang, Xiaowei" <xiaowei.yang@intel.com>,
"Dong, Eddie" <eddie.dong@intel.com>,
"Li, Xin" <xin.li@intel.com>, Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <peterz@infradead.org>,
Mike Galbraith <efault@gmx.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
vatsa@linux.vnet.ibm.com
Subject: Re: VM performance issue in KVM guests.
Date: Thu, 15 Apr 2010 11:18:43 +0300 [thread overview]
Message-ID: <4BC6CBE3.8020207@redhat.com> (raw)
In-Reply-To: <p2o2eae271004142158xaa5da968ueff0c2afe6894f9d@mail.gmail.com>
On 04/15/2010 07:58 AM, Srivatsa Vaddagiri wrote:
> On Sun, Apr 11, 2010 at 11:40 PM, Avi Kivity <avi@redhat.com
> <mailto:avi@redhat.com>> wrote:
>
> The current handing of PLE is very suboptimal. With proper
> directed yield we should be much better there.
>
>
>
> Hi Avi,
> By directed yield, do you mean transfer the timeslice of
> one thread (which is contending for a lock) to another thread (which
> is holding a lock)?
It's a priority transfer (in CFS terms, vruntime) (we don't know who
holds the lock, so we pick a co-vcpu at random).
> If at that point in time, the lock-holder thread/VCPU is actually not
> running currently, ie it is at the back of the runqueue, would it help
> much? In such case, it will take time for the lock holder to run again
> and the default timeslice it would have got could have been sufficient
> to release the lock?
The idea is to increase the chances to the target vcpu to run, and to
decrease the changes of the spinner to run (hopefully they change places).
>
> I am also working on a prototype for some other technique here - to
> avoid preempting guest threads/VCPUs in the middle of their
> (spin-lock) critical section. This requires guest to hint host when
> there are in such a section. [1] has shown 33% improvement to an
> apache benchmark based on this idea.
>
Certainly that has even greater potential for Linux guests. Note that
we spin on mutexes now, so we need to prevent preemption while the lock
owner is running.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
next prev parent reply other threads:[~2010-04-15 8:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-10 8:16 VM performance issue in KVM guests Zhang, Xiantao
2010-04-10 19:27 ` Avi Kivity
2010-04-12 2:04 ` Zhang, Xiantao
2010-04-12 6:40 ` Avi Kivity
2010-04-13 0:50 ` Zhang, Xiantao
2010-04-13 6:46 ` Avi Kivity
2010-04-14 3:24 ` Zhang, Xiantao
2010-04-14 8:14 ` Avi Kivity
2010-04-16 2:27 ` Zhang, Xiantao
2010-04-17 19:02 ` Avi Kivity
[not found] ` <p2o2eae271004142158xaa5da968ueff0c2afe6894f9d@mail.gmail.com>
2010-04-15 8:18 ` Avi Kivity [this message]
2010-04-15 13:33 ` Peter Zijlstra
2010-04-15 16:43 ` Srivatsa Vaddagiri
2010-04-16 10:40 ` Peter Zijlstra
2010-04-19 1:32 ` Zhang, Xiantao
2010-04-17 19:04 ` 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=4BC6CBE3.8020207@redhat.com \
--to=avi@redhat.com \
--cc=eddie.dong@intel.com \
--cc=efault@gmx.de \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mtosatti@redhat.com \
--cc=peterz@infradead.org \
--cc=vatsa.ml@gmail.com \
--cc=vatsa@linux.vnet.ibm.com \
--cc=xiantao.zhang@intel.com \
--cc=xiaowei.yang@intel.com \
--cc=xin.li@intel.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.