From: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Avi Kivity <avi.kivity@gmail.com>, Gleb Natapov <gleb@redhat.com>,
Ingo Molnar <mingo@redhat.com>, Rik van Riel <riel@redhat.com>,
Srikar <srikar@linux.vnet.ibm.com>,
"H. Peter Anvin" <hpa@zytor.com>,
"Nikunj A. Dadhania" <nikunj@linux.vnet.ibm.com>,
KVM <kvm@vger.kernel.org>, Thomas Gleixner <tglx@linutronix.de>,
Jiannan Ouyang <ouyang@cs.pitt.edu>,
Chegu Vinod <chegu_vinod@hp.com>,
"Andrew M. Theurer" <habanero@linux.vnet.ibm.com>,
LKML <linux-kernel@vger.kernel.org>,
Srivatsa Vaddagiri <srivatsa.vaddagiri@gmail.com>,
Andrew Jones <drjones@redhat.com>
Subject: Re: [PATCH RFC 0/2] kvm: Better yield_to candidate using preemption notifiers
Date: Fri, 08 Mar 2013 12:43:08 +0530 [thread overview]
Message-ID: <51398F84.5060808@linux.vnet.ibm.com> (raw)
In-Reply-To: <20130307191059.GC15854@amt.cnet>
On 03/08/2013 12:40 AM, Marcelo Tosatti wrote:
> On Mon, Mar 04, 2013 at 11:31:46PM +0530, Raghavendra K T wrote:
>> This patch series further filters better vcpu candidate to yield to
>> in PLE handler. The main idea is to record the preempted vcpus using
>> preempt notifiers and iterate only those preempted vcpus in the
>> handler. Note that the vcpus which were in spinloop during pause loop
>> exit are already filtered.
>>
>> Thanks Jiannan, Avi for bringing the idea and Gleb, PeterZ for
>> precious suggestions during the discussion.
>> Thanks Srikar for suggesting to avoid rcu lock while checking task state
>> that has improved overcommit cases.
>>
>> There are basically two approches for the implementation.
>>
>> Method 1: Uses per vcpu preempt flag (this series).
>>
>> Method 2: We keep a bitmap of preempted vcpus. using this we can easily
>> iterate over preempted vcpus.
>>
>> Note that method 2 needs an extra index variable to identify/map bitmap to
>> vcpu and it also needs static vcpu allocation.
>>
>> I am also posting Method 2 approach for reference in case it interests.
>>
>> Result: decent improvement for kernbench and ebizzy.
>>
>> base = 3.8.0 + undercommit patches
>> patched = base + preempt patches
>>
>> Tested on 32 core (no HT) mx3850 machine with 32 vcpu guest 8GB RAM
>>
>> --+-----------+-----------+-----------+------------+-----------+
>> kernbench (exec time in sec lower is beter)
>> --+-----------+-----------+-----------+------------+-----------+
>> base stdev patched stdev %improve
>> --+-----------+-----------+-----------+------------+-----------+
>> 1x 47.0383 4.6977 44.2584 1.2899 5.90986
>> 2x 96.0071 7.1873 91.2605 7.3567 4.94401
>> 3x 164.0157 10.3613 156.6750 11.4267 4.47561
>> 4x 212.5768 23.7326 204.4800 13.2908 3.80888
>> --+-----------+-----------+-----------+------------+-----------+
>> no ple kernbench 1x result for reference: 46.056133
>>
>> --+-----------+-----------+-----------+------------+-----------+
>> ebizzy (record/sec higher is better)
>> --+-----------+-----------+-----------+------------+-----------+
>> base stdev patched stdev %improve
>> --+-----------+-----------+-----------+------------+-----------+
>> 1x 5609.2000 56.9343 6263.7000 64.7097 11.66833
>> 2x 2071.9000 108.4829 2653.5000 181.8395 28.07085
>> 3x 1557.4167 109.7141 1993.5000 166.3176 28.00043
>> 4x 1254.7500 91.2997 1765.5000 237.5410 40.70532
>> --+-----------+-----------+-----------+------------+-----------+
>> no ple ebizzy 1x result for reference : 7394.9 rec/sec
>>
>> Please let me know if you have any suggestions and comments.
>>
>> Raghavendra K T (2):
>> kvm: Record the preemption status of vcpus using preempt notifiers
>> kvm: Iterate over only vcpus that are preempted
>
> Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>
>
Thank you Marcelo.
next prev parent reply other threads:[~2013-03-08 7:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-04 18:01 [PATCH RFC 0/2] kvm: Better yield_to candidate using preemption notifiers Raghavendra K T
2013-03-04 18:02 ` [PATCH RFC 1/2] kvm: Record the preemption status of vcpus using preempt notifiers Raghavendra K T
2013-03-05 15:19 ` Chegu Vinod
2013-03-07 9:19 ` Raghavendra K T
2013-03-04 18:02 ` [PATCH RFC 2/2] kvm: Iterate over only vcpus that are preempted Raghavendra K T
2013-03-05 15:20 ` Chegu Vinod
2013-03-05 9:53 ` [PATCH RFC 0/2] kvm: Better yield_to candidate using preemption notifiers Andrew Jones
2013-03-05 12:24 ` Raghavendra K T
2013-03-05 12:40 ` Andrew Jones
2013-03-07 19:10 ` Marcelo Tosatti
2013-03-08 7:13 ` Raghavendra K T [this message]
2013-03-11 9:38 ` Gleb Natapov
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=51398F84.5060808@linux.vnet.ibm.com \
--to=raghavendra.kt@linux.vnet.ibm.com \
--cc=avi.kivity@gmail.com \
--cc=chegu_vinod@hp.com \
--cc=drjones@redhat.com \
--cc=gleb@redhat.com \
--cc=habanero@linux.vnet.ibm.com \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mtosatti@redhat.com \
--cc=nikunj@linux.vnet.ibm.com \
--cc=ouyang@cs.pitt.edu \
--cc=peterz@infradead.org \
--cc=riel@redhat.com \
--cc=srikar@linux.vnet.ibm.com \
--cc=srivatsa.vaddagiri@gmail.com \
--cc=tglx@linutronix.de \
/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).