public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: "Zhao, Yunfeng" <yunfeng.zhao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: ABAT Testing report, kernel 76f0301b5.., user 04cff0e47..
Date: Mon, 23 Jul 2007 19:12:14 +0300	[thread overview]
Message-ID: <46A4D35E.5010708@qumranet.com> (raw)
In-Reply-To: <10EA09EFD8728347A513008B6B0DA77A01CBF1D2-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>

Zhao, Yunfeng wrote:
> Hi, all
>
> This is today's ABAT testing result against kvm.git 76f0301b5e4d2603d8e1ee5295db29faea660b49 and kvm-userspace.git 04cff0e47c4cc1e3d51f917a657b97ac2ed29719
> We are still using UP guests in the testing, we will try to enable some SMP Windows and Linux tests in this week.
>
> One new issue is about performance regression since KVM-29
> 1. Performance regression since KVM-29
> https://sourceforge.net/tracker/index.php?func=detail&aid=1758756&group_id=180599&atid=893831
>
>   

I bisected this to

commit 8a1449563b3e5ede56b28cc977c8da22a17cdf51
Author: Luca Tettamanti <kronos.it-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date:   Tue Jun 19 22:41:38 2007 +0200

    KVM: Avoid useless memory write when possible

    When writing to normal memory and the memory area is unchanged the write
    can be safely skipped, avoiding the costly kvm_mmu_pte_write.

    Signed-Off-By: Luca Tettamanti <kronos.it-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
    Signed-off-by: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>

diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 7826f16..5603000 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -1170,8 +1170,10 @@ static int emulator_write_phys(struct kvm_vcpu 
*vcpu, gpa_t gpa,
                return 0;
        mark_page_dirty(vcpu->kvm, gpa >> PAGE_SHIFT);
        virt = kmap_atomic(page, KM_USER0);
-       kvm_mmu_pte_write(vcpu, gpa, virt + offset, val, bytes);
-       memcpy(virt + offset_in_page(gpa), val, bytes);
+       if (memcmp(virt + offset_in_page(gpa), val, bytes)) {
+               kvm_mmu_pte_write(vcpu, gpa, virt + offset, val, bytes);
+               memcpy(virt + offset_in_page(gpa), val, bytes);
+       }
        kunmap_atomic(virt, KM_USER0);
        return 1;
 }

The effect with this patch applied is that pf_fixed grows very high.  
I'm guessing that this is because not calling kvm_mmu_pte_write() 
defeats the fork detector and causes a high amount of emulated writes to 
page table when fork() resets the writable bit on read-only ptes.

-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

  parent reply	other threads:[~2007-07-23 16:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-23  9:09 ABAT Testing report, kernel 76f0301b5.., user 04cff0e47 Zhao, Yunfeng
     [not found] ` <10EA09EFD8728347A513008B6B0DA77A01CBF1D2-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-07-23 16:12   ` Avi Kivity [this message]
     [not found]     ` <46A4D35E.5010708-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-24  5:10       ` Zhao, Yunfeng

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=46A4D35E.5010708@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=yunfeng.zhao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /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