From: Marc Zyngier <maz@kernel.org>
To: Shivam Kumar <shivam.kumar1@nutanix.com>
Cc: pbonzini@redhat.com, seanjc@google.com, james.morse@arm.com,
borntraeger@linux.ibm.com, david@redhat.com, kvm@vger.kernel.org,
Shaju Abraham <shaju.abraham@nutanix.com>,
Manish Mishra <manish.mishra@nutanix.com>,
Anurag Madnawat <anurag.madnawat@nutanix.com>
Subject: Re: [PATCH v7 3/4] KVM: arm64: Dirty quota-based throttling of vcpus
Date: Thu, 17 Nov 2022 20:44:30 +0000 [thread overview]
Message-ID: <86v8ndnwep.wl-maz@kernel.org> (raw)
In-Reply-To: <20221113170507.208810-4-shivam.kumar1@nutanix.com>
On Sun, 13 Nov 2022 17:05:10 +0000,
Shivam Kumar <shivam.kumar1@nutanix.com> wrote:
>
> Exit to userspace whenever the dirty quota is exhausted (i.e. dirty count
> equals/exceeds dirty quota) to request more dirty quota.
>
> Suggested-by: Shaju Abraham <shaju.abraham@nutanix.com>
> Suggested-by: Manish Mishra <manish.mishra@nutanix.com>
> Co-developed-by: Anurag Madnawat <anurag.madnawat@nutanix.com>
> Signed-off-by: Anurag Madnawat <anurag.madnawat@nutanix.com>
> Signed-off-by: Shivam Kumar <shivam.kumar1@nutanix.com>
> ---
> arch/arm64/kvm/arm.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
> index 94d33e296e10..850024982dd9 100644
> --- a/arch/arm64/kvm/arm.c
> +++ b/arch/arm64/kvm/arm.c
> @@ -746,6 +746,15 @@ static int check_vcpu_requests(struct kvm_vcpu *vcpu)
>
> if (kvm_check_request(KVM_REQ_SUSPEND, vcpu))
> return kvm_vcpu_suspend(vcpu);
> +
> + if (kvm_check_request(KVM_REQ_DIRTY_QUOTA_EXIT, vcpu)) {
> + struct kvm_run *run = vcpu->run;
> +
> + run->exit_reason = KVM_EXIT_DIRTY_QUOTA_EXHAUSTED;
> + run->dirty_quota_exit.count = vcpu->stat.generic.pages_dirtied;
> + run->dirty_quota_exit.quota = vcpu->dirty_quota;
> + return 0;
> + }
> }
>
> return 1;
As pointed out by others, this should be common code. This would
definitely avoid the difference in behaviour between architectures.
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2022-11-17 20:44 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-13 17:05 [PATCH v7 0/4] KVM: Dirty quota-based throttling Shivam Kumar
2022-11-13 17:05 ` [PATCH v7 1/4] KVM: Implement dirty quota-based throttling of vcpus Shivam Kumar
2022-11-14 23:29 ` Yunhong Jiang
2022-11-15 4:48 ` Shivam Kumar
2022-11-17 19:26 ` Marc Zyngier
2022-11-18 9:47 ` Shivam Kumar
2022-11-22 17:46 ` Marc Zyngier
2022-12-06 6:22 ` Shivam Kumar
2022-12-07 16:44 ` Marc Zyngier
2022-12-07 19:53 ` Sean Christopherson
2022-12-08 7:30 ` Shivam Kumar
2022-12-25 16:50 ` Shivam Kumar
2022-12-26 10:07 ` Marc Zyngier
2023-01-07 17:24 ` Shivam Kumar
2023-01-07 21:44 ` Marc Zyngier
2023-01-14 13:07 ` Shivam Kumar
2023-01-15 9:56 ` Marc Zyngier
2023-01-15 14:50 ` Shivam Kumar
2023-01-15 19:13 ` Marc Zyngier
2023-01-29 22:00 ` Shivam Kumar
2023-02-11 6:52 ` Shivam Kumar
2023-02-12 17:09 ` Marc Zyngier
2023-02-12 17:54 ` Shivam Kumar
2023-02-12 18:02 ` Marc Zyngier
2023-02-12 17:56 ` Shivam Kumar
2022-12-08 7:20 ` Shivam Kumar
2022-11-25 10:52 ` kernel test robot
2022-11-13 17:05 ` [PATCH v7 2/4] KVM: x86: Dirty " Shivam Kumar
2022-11-15 0:16 ` Yunhong Jiang
2022-11-15 4:55 ` Shivam Kumar
2022-11-15 6:45 ` Yunhong Jiang
2022-11-18 8:51 ` Shivam Kumar
2022-11-13 17:05 ` [PATCH v7 3/4] KVM: arm64: " Shivam Kumar
2022-11-15 0:27 ` Yunhong Jiang
2022-11-15 5:10 ` Shivam Kumar
2022-11-17 20:44 ` Marc Zyngier [this message]
2022-11-18 8:56 ` Shivam Kumar
2022-11-13 17:05 ` [PATCH v7 4/4] KVM: selftests: Add selftests for dirty quota throttling Shivam Kumar
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=86v8ndnwep.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=anurag.madnawat@nutanix.com \
--cc=borntraeger@linux.ibm.com \
--cc=david@redhat.com \
--cc=james.morse@arm.com \
--cc=kvm@vger.kernel.org \
--cc=manish.mishra@nutanix.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=shaju.abraham@nutanix.com \
--cc=shivam.kumar1@nutanix.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.