All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
To: Avi Kivity <avi@redhat.com>, Rik van Riel <riel@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	peterz@infradead.org, linux-kernel@vger.kernel.org,
	vatsa@linux.vnet.ibm.com, bharata@linux.vnet.ibm.com
Subject: Re: [RFC PATCH 0/4] Gang scheduling in CFS
Date: Wed, 04 Jan 2012 16:22:54 +0530	[thread overview]
Message-ID: <87mxa3zqm1.fsf@abhimanyu.in.ibm.com> (raw)
In-Reply-To: <4F017AD2.3090504@redhat.com>

On Mon, 02 Jan 2012 11:37:22 +0200, Avi Kivity <avi@redhat.com> wrote:
> On 12/31/2011 04:21 AM, Nikunj A Dadhania wrote:
> >
> >     GangV2:
> >     27.45%       ebizzy  libc-2.12.so            [.] __memcpy_ssse3_back
> >     12.12%       ebizzy  [kernel.kallsyms]       [k] clear_page
> >      9.22%       ebizzy  [kernel.kallsyms]       [k] __do_page_fault
> >      6.91%       ebizzy  [kernel.kallsyms]       [k] flush_tlb_others_ipi
> >      4.06%       ebizzy  [kernel.kallsyms]       [k] get_page_from_freelist
> >      4.04%       ebizzy  [kernel.kallsyms]       [k] ____pagevec_lru_add
> >
> >     GangBase:
> >     45.08%       ebizzy  [kernel.kallsyms]       [k] flush_tlb_others_ipi
> >     15.38%       ebizzy  libc-2.12.so            [.] __memcpy_ssse3_back
> >      7.00%       ebizzy  [kernel.kallsyms]       [k] clear_page
> >      4.88%       ebizzy  [kernel.kallsyms]       [k] __do_page_fault
> 
> Looping in flush_tlb_others().  Rik, what trace an we run to find out
> why PLE directed yield isn't working as expected?
> 
I tried some experiments by adding a pause_loop_exits stat in the
kvm_vpu_stat.

Here are some observation related to Baseline-only(8vm case)

              | ple_gap=128 | ple_gap=64 | ple_gap=256 | ple_window=2048
--------------+-------------+------------+-------------+----------------
EbzyRecords/s |    2247.50  |    2132.75 |    2086.25  |      1835.62
PauseExits    | 7928154.00  | 6696342.00 | 7365999.00  |  50319582.00

With ple_window = 2048, PauseExits is more than 6times the default case

-----

    From: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com>

    Add Pause-loop-exit stats to kvm_vcpu_stat

    Signed-off-by: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com>


diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index b4973f4..be2e7f2 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -539,6 +539,7 @@ struct kvm_vcpu_stat {
        u32 hypercalls;
        u32 irq_injections;
        u32 nmi_injections;
+       u32 pause_loop_exits;
 };
 
 struct x86_instruction_info;
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 579a0b5..29e90b7 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -4897,6 +4897,8 @@ out:
 static int handle_pause(struct kvm_vcpu *vcpu)
 {
        skip_emulated_instruction(vcpu);
+       ++vcpu->stat.pause_loop_exits;
        kvm_vcpu_on_spin(vcpu);
 
        return 1;
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index c38efd7..87433a8 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -149,6 +149,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
        { "mmu_unsync", VM_STAT(mmu_unsync) },
        { "remote_tlb_flush", VM_STAT(remote_tlb_flush) },
        { "largepages", VM_STAT(lpages) },
+       { "pause_loop_exits", VCPU_STAT(pause_loop_exits) },
        { NULL }
 };


  parent reply	other threads:[~2012-01-04 10:57 UTC|newest]

Thread overview: 95+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-19  8:33 [RFC PATCH 0/4] Gang scheduling in CFS Nikunj A. Dadhania
2011-12-19  8:34 ` [RFC PATCH 1/4] sched: Adding cpu.gang file to cpu cgroup Nikunj A. Dadhania
2011-12-19  8:34 ` [RFC PATCH 2/4] sched: Adding gang scheduling infrastrucure Nikunj A. Dadhania
2011-12-19 15:51   ` Peter Zijlstra
2011-12-19 16:51     ` Peter Zijlstra
2011-12-20  1:43       ` Nikunj A Dadhania
2011-12-20  1:39     ` Nikunj A Dadhania
2011-12-19  8:34 ` [RFC PATCH 3/4] sched: Gang using set_next_buddy Nikunj A. Dadhania
2011-12-19  8:35 ` [RFC PATCH 4/4] sched:Implement set_gang_buddy Nikunj A. Dadhania
2011-12-19 15:51   ` Peter Zijlstra
2011-12-20  1:43     ` Nikunj A Dadhania
2011-12-26  2:30     ` Nikunj A Dadhania
2011-12-19 11:23 ` [RFC PATCH 0/4] Gang scheduling in CFS Ingo Molnar
2011-12-19 11:44   ` Avi Kivity
2011-12-19 11:50     ` Nikunj A Dadhania
2011-12-19 11:59       ` Avi Kivity
2011-12-19 12:06         ` Nikunj A Dadhania
2011-12-19 12:50           ` Avi Kivity
2011-12-19 13:09             ` Nikunj A Dadhania
2011-12-19 11:45   ` Nikunj A Dadhania
2011-12-19 13:22     ` Nikunj A Dadhania
2011-12-19 16:28       ` Ingo Molnar
2011-12-21 10:39   ` Nikunj A Dadhania
2011-12-21 10:43     ` Avi Kivity
2011-12-23  3:20       ` Nikunj A Dadhania
2011-12-23 10:36         ` Ingo Molnar
2011-12-25 10:58           ` Avi Kivity
2011-12-25 15:45             ` Avi Kivity
2011-12-26  3:14             ` Nikunj A Dadhania
2011-12-26  9:05               ` Avi Kivity
2011-12-26 11:33                 ` Nikunj A Dadhania
2011-12-26 11:41                   ` Avi Kivity
2011-12-27  1:47                     ` Nikunj A Dadhania
2011-12-27  9:15                       ` Avi Kivity
2011-12-27 10:24                         ` Nikunj A Dadhania
2011-12-29 16:07                 ` Better qemu/kvm defaults (was Re: [RFC PATCH 0/4] Gang scheduling in CFS) Dor Laor
2011-12-29 16:07                   ` [Qemu-devel] " Dor Laor
2011-12-29 16:13                   ` Avi Kivity
2011-12-29 16:13                     ` [Qemu-devel] " Avi Kivity
2011-12-29 16:16                   ` Anthony Liguori
2011-12-29 16:16                     ` Anthony Liguori
2012-01-01 10:16                     ` Dor Laor
2012-01-01 10:16                       ` [Qemu-devel] " Dor Laor
2012-01-01 14:01                       ` Ronen Hod
2012-01-01 14:01                         ` Ronen Hod
2012-01-02  9:37                         ` Dor Laor
2012-01-02  9:37                           ` [Qemu-devel] " Dor Laor
2012-01-03 15:48                       ` Anthony Liguori
2012-01-03 15:48                         ` Anthony Liguori
2012-01-03 22:31                         ` Dor Laor
2012-01-03 22:31                           ` Dor Laor
2012-01-03 22:45                           ` Anthony Liguori
2012-01-03 22:45                             ` [Qemu-devel] " Anthony Liguori
2012-01-03 22:59                             ` Dor Laor
2012-01-03 22:59                               ` Dor Laor
2011-12-27  3:15               ` [RFC PATCH 0/4] Gang scheduling in CFS Nikunj A Dadhania
2011-12-27  9:17                 ` Avi Kivity
2011-12-27  9:44                   ` Nikunj A Dadhania
2011-12-27  9:51                     ` Avi Kivity
2011-12-27 10:10                       ` Nikunj A Dadhania
2011-12-27 10:34                         ` Avi Kivity
2011-12-27 10:43                           ` Nikunj A Dadhania
2011-12-27 10:53                             ` Avi Kivity
2011-12-30  9:51             ` Ingo Molnar
2011-12-30 10:10               ` Nikunj A Dadhania
2011-12-31  2:21                 ` Nikunj A Dadhania
2012-01-02  4:20                   ` Nikunj A Dadhania
2012-01-02  9:39                     ` Avi Kivity
2012-01-02 10:22                       ` Nikunj A Dadhania
2012-01-02  9:37                   ` Avi Kivity
2012-01-02 10:30                     ` Nikunj A Dadhania
2012-01-02 13:33                       ` Avi Kivity
2012-01-04 10:52                     ` Nikunj A Dadhania [this message]
2012-01-04 14:41                       ` Avi Kivity
2012-01-04 14:56                         ` Srivatsa Vaddagiri
2012-01-04 17:13                           ` Avi Kivity
2012-01-05  6:57                             ` Nikunj A Dadhania
2012-01-04 16:47                         ` Rik van Riel
2012-01-04 17:16                           ` Avi Kivity
2012-01-04 20:56                             ` Rik van Riel
2012-01-04 21:31                             ` Peter Zijlstra
2012-01-04 21:41                               ` Avi Kivity
2012-01-05  9:10                                 ` Ingo Molnar
2012-02-20  8:08                                   ` Nikunj A Dadhania
2012-02-20  8:14                                     ` Ingo Molnar
2012-02-20 10:51                                     ` Peter Zijlstra
2012-02-20 11:53                                       ` Nikunj A Dadhania
2012-02-20 12:02                                         ` Srivatsa Vaddagiri
2012-02-20 12:14                                           ` Peter Zijlstra
2012-01-05  2:10                         ` Nikunj A Dadhania
2011-12-19 15:51 ` Peter Zijlstra
2011-12-19 16:09   ` Alan Cox
2011-12-19 22:10   ` Benjamin Herrenschmidt
2011-12-20  1:56   ` Nikunj A Dadhania
2011-12-20  8:52   ` Jeremy Fitzhardinge

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=87mxa3zqm1.fsf@abhimanyu.in.ibm.com \
    --to=nikunj@linux.vnet.ibm.com \
    --cc=avi@redhat.com \
    --cc=bharata@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=riel@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 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.