From: Paolo Bonzini <pbonzini@redhat.com>
To: maobibo <maobibo@loongson.cn>,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: Remove duplicated zero clear with dirty_bitmap buffer
Date: Thu, 20 Jun 2024 23:17:58 +0200 [thread overview]
Message-ID: <5a2b21ce-2554-4ee8-bff1-76231ea77703@redhat.com> (raw)
In-Reply-To: <fb2da53e-791d-aef7-4dbb-dcf054675f9b@loongson.cn>
On 6/14/24 04:45, maobibo wrote:
> I do not know whether KVM_DIRTY_LOG_INITIALLY_SET should be enabled on
> LoongArch. If it is set, write protection for second MMU will start one
> by one in function kvm_arch_mmu_enable_log_dirty_pt_masked() when dirty
> log is cleared if it is set, else write protection will start in
> function kvm_arch_commit_memory_region() when flag of memslot is changed.
>
> I do not see the obvious benefits between these two write protect
> stages. Can anyone give me any hints?
The advantage is that you get (a lot) fewer vmexits to set the dirty
bitmap, and that write protection is not done in a single expensive
step. Instead it is done at the time that userspace first clears the
bits in the dirty bitmap. It provides much better performance.
Paolo
next prev parent reply other threads:[~2024-06-20 21:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-13 12:54 Bibo Mao
2024-06-13 19:25 ` Christophe JAILLET
2024-06-14 2:45 ` maobibo
2024-06-20 21:17 ` Paolo Bonzini [this message]
2024-06-21 1:59 ` maobibo
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=5a2b21ce-2554-4ee8-bff1-76231ea77703@redhat.com \
--to=pbonzini@redhat.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maobibo@loongson.cn \
/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
all inboxes | Powered by JetHome®