From: Marc Zyngier <maz@kernel.org>
To: Gavin Shan <gshan@redhat.com>
Cc: mark.rutland@arm.com, drjones@redhat.com, suzuki.poulose@arm.com,
catalin.marinas@arm.com, eric.auger@redhat.com,
james.morse@arm.com, shan.gavin@gmail.com, sudeep.holla@arm.com,
will@kernel.org, kvmarm@lists.cs.columbia.edu,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH RFCv1 0/7] Support Async Page Fault
Date: Fri, 10 Apr 2020 13:52:35 +0100 [thread overview]
Message-ID: <d2882e806ad2f9793437160093c8d3fa@kernel.org> (raw)
In-Reply-To: <20200410085820.758686-1-gshan@redhat.com>
Hi Gavin,
On 2020-04-10 09:58, Gavin Shan wrote:
> There are two stages of page faults and the stage one page fault is
> handled by guest itself. The guest is trapped to host when the page
> fault is caused by stage 2 page table, for example missing. The guest
> is suspended until the requested page is populated. To populate the
> requested page can be costly and might be related to IO activities
> if the page was swapped out previously. In this case, the guest has
> to suspend for a few of milliseconds at least, regardless of the
> overall system load.
>
> The series adds support to asychornous page fault to improve above
> situation. If it's costly to populate the requested page, a signal
> (PAGE_NOT_PRESENT) is sent to guest so that the faulting process can
> be rescheduled if it can be. Otherwise, it is put into power-saving
> mode. Another signal (PAGE_READY) is sent to guest once the requested
> page is populated so that the faulting process can be waken up either
> from either waiting state or power-saving state.
>
> In order to fulfil the control flow and convey signals between host
> and guest. A IMPDEF system register (SYS_ASYNC_PF_EL1) is introduced.
> The register accepts control block's physical address, plus requested
> features. Also, the signal is sent using data abort with the specific
> IMPDEF Data Fault Status Code (DFSC). The specific signal is stored
> in the control block by host, to be consumed by guest.
>
> Todo
> ====
> * CONFIG_KVM_ASYNC_PF_SYNC is disabled for now because the exception
> injection can't work in nested mode. It might be something to be
> improved in future.
> * KVM_ASYNC_PF_SEND_ALWAYS is disabled even with CONFIG_PREEMPTION
> because it's simply not working reliably.
> * Tracepoints, which should something to be done in short term.
> * kvm-unit-test cases.
> * More testing and debugging are needed. Sometimes, the guest can be
> stuck and the root cause needs to be figured out.
Let me add another few things:
- KVM/arm is (supposed to be) an architectural hypervisor. It means
that one of the design goal is to have as few differences as possible
from the actual hardware. I'm not keen on deviating from it (next
thing you know, you'll add all the PV horror from Xen, HV, VMware...).
- The idea of butchering the arm64 mm subsystem to handle a new exotic
style of exceptions is not something I am looking forward to. We
might as well PV the whole MMU, Xen style, and be done with it. I'll
let the arm64 maintainers comment on this though.
- We don't add IMPDEF sysregs, period. That's reserved for the HW. If
you want to trap, there's the HVC instruction to that effect.
- If this is such a great improvement, where are the performance
numbers?
- The fact that it apparently cannot work with nesting nor with
preemption tends to indicate that it isn't future proof.
Thanks,
M.
--
Jazz is not dead. It just smells funny...
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-04-10 12:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-10 8:58 [PATCH RFCv1 0/7] Support Async Page Fault Gavin Shan
2020-04-10 8:58 ` [PATCH RFCv1 1/7] kvm/arm64: Rename kvm_vcpu_get_hsr() to kvm_vcpu_get_esr() Gavin Shan
2020-04-10 8:58 ` [PATCH RFCv1 2/7] kvm/arm64: Detach ESR operator from vCPU struct Gavin Shan
2020-04-10 8:58 ` [PATCH RFCv1 3/7] kvm/arm64: Replace hsr with esr Gavin Shan
2020-04-10 8:58 ` [PATCH RFCv1 4/7] kvm/arm64: Export kvm_handle_user_mem_abort() with prefault mode Gavin Shan
2020-04-10 8:58 ` [PATCH RFCv1 5/7] kvm/arm64: Allow inject data abort with specified DFSC Gavin Shan
2020-04-10 8:58 ` [PATCH RFCv1 6/7] kvm/arm64: Support async page fault Gavin Shan
2020-04-10 8:58 ` [PATCH RFCv1 7/7] arm64: " Gavin Shan
2020-04-10 12:52 ` Marc Zyngier [this message]
2020-04-14 5:39 ` [PATCH RFCv1 0/7] Support Async Page Fault Gavin Shan
2020-04-14 11:05 ` Mark Rutland
2020-04-16 7:59 ` Gavin Shan
2020-04-16 9:16 ` Mark Rutland
2020-04-16 9:21 ` Will Deacon
2020-04-17 10:34 ` Gavin Shan
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=d2882e806ad2f9793437160093c8d3fa@kernel.org \
--to=maz@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=drjones@redhat.com \
--cc=eric.auger@redhat.com \
--cc=gshan@redhat.com \
--cc=james.morse@arm.com \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=shan.gavin@gmail.com \
--cc=sudeep.holla@arm.com \
--cc=suzuki.poulose@arm.com \
--cc=will@kernel.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;
as well as URLs for NNTP newsgroup(s).