From: Oliver Upton <oliver.upton@linux.dev>
To: Gavin Shan <gshan@redhat.com>
Cc: Ricardo Koller <ricarkol@google.com>,
pbonzini@redhat.com, maz@kernel.org, oupton@google.com,
yuzenghui@huawei.com, dmatlack@google.com, kvm@vger.kernel.org,
kvmarm@lists.linux.dev, qperret@google.com,
catalin.marinas@arm.com, andrew.jones@linux.dev,
seanjc@google.com, alexandru.elisei@arm.com,
suzuki.poulose@arm.com, eric.auger@redhat.com, reijiw@google.com,
rananta@google.com, bgardon@google.com, ricarkol@gmail.com
Subject: Re: [PATCH v2 00/12] Implement Eager Page Splitting for ARM.
Date: Tue, 14 Feb 2023 07:33:19 +0000 [thread overview]
Message-ID: <Y+s5PwV1l60jXal1@linux.dev> (raw)
In-Reply-To: <1a3afa6d-3478-31dd-6f34-52075875c2fa@redhat.com>
Hi Gavin,
On Tue, Feb 14, 2023 at 04:57:59PM +1100, Gavin Shan wrote:
> On 2/7/23 3:58 AM, Ricardo Koller wrote:
<snip>
> > Eager Page Splitting fixes the above two issues by eagerly splitting
> > huge-pages when enabling dirty logging. The goal is to avoid doing it
> > while faulting on write-protected pages.
</snip>
> I'm not sure why we can't eagerly split the PMD mapping into 512 PTE
> mapping in the page fault handler?
The entire goal of the series is to avoid page splitting at all on the
stage-2 abort path. Ideally we want to minimize the time taken to handle
a fault so we can get back to running the guest. The requirement to
perform a break-before-make operation to change the mapping granularity
can, as Ricardo points out, be a bottleneck on contemporary implementations.
There is a clear uplift with the proposed implementation already, and I
would expect that margin to widen if/when we add support for lockless
(i.e. RCU-protected) permission relaxation.
> In the implementation, the newly introduced API
> kvm_pgtable_stage2_split() calls to kvm_pgtable_stage2_create_unlinked()
> and then stage2_map_walker(), which is part of kvm_pgtable_stage2_map(),
> to create the unlinked page tables.
This is deliberate code reuse. Page table construction in the fault path
is largely similar to that of eager split besides the fact that one is
working on 'live' page tables whereas the other is not. As such I gave
the suggestion to Ricardo to reuse what we have today for the sake of
eager splitting.
--
Thanks,
Oliver
next prev parent reply other threads:[~2023-02-14 10:13 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-06 16:58 [PATCH v2 00/12] Implement Eager Page Splitting for ARM Ricardo Koller
2023-02-06 16:58 ` [PATCH v2 01/12] KVM: arm64: Add KVM_PGTABLE_WALK ctx->flags for skipping BBM and CMO Ricardo Koller
2023-02-06 16:58 ` [PATCH v2 02/12] KVM: arm64: Rename free_unlinked to free_removed Ricardo Koller
2023-02-06 16:58 ` [PATCH v2 03/12] KVM: arm64: Add helper for creating unlinked stage2 subtrees Ricardo Koller
2023-02-07 14:51 ` Ricardo Koller
2023-02-06 16:58 ` [PATCH v2 04/12] KVM: arm64: Add kvm_pgtable_stage2_split() Ricardo Koller
2023-02-09 5:58 ` Gavin Shan
2023-02-09 12:40 ` Ricardo Koller
2023-02-09 16:17 ` Ricardo Koller
2023-02-09 22:48 ` Gavin Shan
2023-02-15 17:43 ` Ricardo Koller
2023-02-06 16:58 ` [PATCH v2 05/12] KVM: arm64: Refactor kvm_arch_commit_memory_region() Ricardo Koller
2023-02-09 6:02 ` Gavin Shan
2023-02-15 17:47 ` Ricardo Koller
2023-02-06 16:58 ` [PATCH v2 06/12] KVM: arm64: Add kvm_uninit_stage2_mmu() Ricardo Koller
2023-02-06 16:58 ` [PATCH v2 07/12] KVM: arm64: Export kvm_are_all_memslots_empty() Ricardo Koller
2023-02-06 16:58 ` [PATCH v2 08/12] KVM: arm64: Add KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE Ricardo Koller
2023-02-08 11:05 ` Gavin Shan
2023-02-06 16:58 ` [PATCH v2 09/12] KVM: arm64: Split huge pages when dirty logging is enabled Ricardo Koller
2023-02-09 6:26 ` Gavin Shan
2023-02-09 12:50 ` Ricardo Koller
2023-02-09 23:09 ` Gavin Shan
2023-02-15 16:25 ` Ricardo Koller
2023-02-06 16:58 ` [PATCH v2 10/12] KVM: arm64: Open-code kvm_mmu_write_protect_pt_masked() Ricardo Koller
2023-02-06 16:58 ` [PATCH v2 11/12] KVM: arm64: Split huge pages during KVM_CLEAR_DIRTY_LOG Ricardo Koller
2023-02-09 6:29 ` Gavin Shan
2023-02-06 16:58 ` [PATCH v2 12/12] KVM: arm64: Use local TLBI on permission relaxation Ricardo Koller
2023-02-14 5:57 ` [PATCH v2 00/12] Implement Eager Page Splitting for ARM Gavin Shan
2023-02-14 7:33 ` Oliver Upton [this message]
2023-02-14 21:59 ` Ricardo Koller
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=Y+s5PwV1l60jXal1@linux.dev \
--to=oliver.upton@linux.dev \
--cc=alexandru.elisei@arm.com \
--cc=andrew.jones@linux.dev \
--cc=bgardon@google.com \
--cc=catalin.marinas@arm.com \
--cc=dmatlack@google.com \
--cc=eric.auger@redhat.com \
--cc=gshan@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=maz@kernel.org \
--cc=oupton@google.com \
--cc=pbonzini@redhat.com \
--cc=qperret@google.com \
--cc=rananta@google.com \
--cc=reijiw@google.com \
--cc=ricarkol@gmail.com \
--cc=ricarkol@google.com \
--cc=seanjc@google.com \
--cc=suzuki.poulose@arm.com \
--cc=yuzenghui@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
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.