KVM Archive on lore.kernel.org
 help / color / Atom feed
From: Keqian Zhu <zhukeqian1@huawei.com>
To: Ben Gardon <bgardon@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kvm <kvm@vger.kernel.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	Sean Christopherson <seanjc@google.com>,
	"Wanghaibin (D)" <wanghaibin.wang@huawei.com>
Subject: Re: [RFC PATCH v2 2/2] KVM: x86: Not wr-protect huge page with init_all_set dirty log
Date: Thu, 29 Apr 2021 11:30:52 +0800
Message-ID: <d2dd806f-7df4-1ba4-9da5-073aece6da1c@huawei.com> (raw)
In-Reply-To: <CANgfPd_FceqBOf3j-o91rZ_Ziq4vNj_0SVMrzfDVsr6PrweL4A@mail.gmail.com>

Hi Ben,

On 2021/4/29 0:22, Ben Gardon wrote:
> On Wed, Apr 28, 2021 at 4:34 AM zhukeqian <zhukeqian1@huawei.com> wrote:
>>
>> Oh, I have to correct myself.
>>
>> without this opt:
>> first round dirtying: write fault and split large mapping
>> second round: write fault
>>
>> with this opt:
>> first round dirtying: no write fault
>> second round: write fault and split large mapping
>>
>> the total test time is expected to be reduced.
> 
> Oh yeah, good point. So we should really see the savings in the first
> round dirty memory time. Good catch.
> 
[...]

>>> It would probably also serve us well to have some kind of "hot" subset
>>> of memory for each vCPU, since some of the benefit of lazy large page
>>> splitting depend on that access pattern.
>>>
>>> 3. Lockstep dirtying and dirty log collection
>>> While this test is currently great for timing dirty logging
>>> operations, it's not great for trickier analysis, especially
>>> reductions to guest degradation. In order to measure that we'd need to
>>> change the test to collect the dirty log as quickly as possible,
>>> independent of what the guest is doing and then also record how much
>>> "progress" the guest is able to make while all that is happening.
>> Yes, make sense.
>>
>> Does the "dirty log collection" contains "dirty log clear"? As I understand, the dirty log
>> collection is very fast, just some memory copy. But for "dirty log clear", we should modify mappings
>> and perform TLBI, the time is much longer.
> 
> Yeah, sorry. By dirty log collection I meant get + clear since the
> test does both before it waits for the guest to dirty all memory
> again.
I see.

> 
>>
>>>
>>> I'd be happy to help review any improvements to the test which you
>>> feel like making.
>> Thanks, Ben. emm... I feel very sorry that perhaps I don't have enough time to do this, many works are queued...
>> On the other hand, I think the "Dirtying memory time" of first round can show us the optimization.
> 
> No worries, I think this is a good patch either way. No need to block
> on test improvements, from my perspective.
OK, thanks.


BRs,
Keqian

      reply index

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-16  8:25 [RFC PATCH v2 0/2] KVM: x86: Enable dirty logging lazily for huge pages Keqian Zhu
2021-04-16  8:25 ` [RFC PATCH v2 1/2] KVM: x86: Support write protect gfn with min_level Keqian Zhu
2021-04-16  8:25 ` [RFC PATCH v2 2/2] KVM: x86: Not wr-protect huge page with init_all_set dirty log Keqian Zhu
2021-04-19 19:20   ` Ben Gardon
2021-04-20  7:49     ` Keqian Zhu
2021-04-20 16:30       ` Ben Gardon
2021-04-27  5:03         ` Keqian Zhu
2021-04-27 16:33           ` Ben Gardon
2021-04-28 10:51             ` Keqian Zhu
     [not found]               ` <60894846.1c69fb81.6e765.161bSMTPIN_ADDED_BROKEN@mx.google.com>
2021-04-28 16:22                 ` Ben Gardon
2021-04-29  3:30                   ` Keqian Zhu [this message]

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=d2dd806f-7df4-1ba4-9da5-073aece6da1c@huawei.com \
    --to=zhukeqian1@huawei.com \
    --cc=bgardon@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=wanghaibin.wang@huawei.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

KVM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kvm/0 kvm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kvm kvm/ https://lore.kernel.org/kvm \
		kvm@vger.kernel.org
	public-inbox-index kvm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.kvm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git