From: Paolo Bonzini <pbonzini@redhat.com>
To: Chris Friesen <cbf123@mail.usask.ca>,
Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>,
avi@redhat.com, mtosatti@redhat.com, kvm@vger.kernel.org
Subject: Re: dirty page tracking in kvm/qemu -- page faults inevitable?
Date: Wed, 30 Jul 2014 17:42:30 +0200 [thread overview]
Message-ID: <53D91266.80906@redhat.com> (raw)
In-Reply-To: <53D8A18D.2050607@mail.usask.ca>
Il 30/07/2014 09:41, Chris Friesen ha scritto:
>> I am afraid that using dirty-bit instead of write-protection may cause the case
>> even more worse for iothread-lock because we need to walk whole sptes to get
>> dirty-set pages, however currently we only need to walk the page set in the
>> bitmap.
>
> I found a document at
> "http://ftp.software-sources.co.il/Processor_Architecture_Update-Bob_Valentine.pdf"
> which talks about the benefits of Haswell. One of the items reads:
>
> "New Accessed and Dirty bits for Extended Page Tables (EPT) eliminates
> major cause of vmexits"
>
> Is that accurate? If so, then it seems like it should allow for the VM
> to run without trying to exit the hypervisor, and as long as it just
> does in-memory operations it won't contend on the iothread lock.
True, but:
1) the problem is fishing the information out of the page tables and
passing it up to userspace. You have to process the whole EPT tree one
page at a time, instead of doing it 64 bits at a time. Also, one source
of bad performance is having to split all entries of the EPT page tables
down to 4K, and you get that anyway.
2) You should not get to userspace simply for marking a page as locked.
As you describe it, your problem seems to be contention between QEMU
threads, KVM is not involved.
3) What version of QEMU are you using? Things have been improving
steadily, and we probably will get to using atomic operations instead of
the iothread lock to protect the migration dirty bitmap.
Paolo
next prev parent reply other threads:[~2014-07-30 15:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-29 22:12 dirty page tracking in kvm/qemu -- page faults inevitable? Chris Friesen
2014-07-30 6:09 ` Xiao Guangrong
2014-07-30 7:41 ` Chris Friesen
2014-07-30 15:42 ` Paolo Bonzini [this message]
2014-07-30 16:02 ` Chris Friesen
2014-07-30 16:18 ` Paolo Bonzini
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=53D91266.80906@redhat.com \
--to=pbonzini@redhat.com \
--cc=avi@redhat.com \
--cc=cbf123@mail.usask.ca \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=xiaoguangrong@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox