From: Sean Christopherson <seanjc@google.com>
To: Shivam Kumar <shivam.kumar1@nutanix.com>
Cc: pbonzini@redhat.com, maz@kernel.org, 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 v6 1/5] KVM: Implement dirty quota-based throttling of vcpus
Date: Wed, 19 Oct 2022 16:01:19 +0000 [thread overview]
Message-ID: <Y1AfT4GAtz79h7oV@google.com> (raw)
In-Reply-To: <1231809b-d214-ba10-784b-d2b015a69e09@nutanix.com>
On Mon, Oct 17, 2022, Shivam Kumar wrote:
>
> On 10/10/22 11:11 am, Shivam Kumar wrote:
> >
> > On 15/09/22 3:40 pm, Shivam Kumar wrote:
> > > diff --git a/include/linux/kvm_types.h b/include/linux/kvm_types.h
> > > index 3ca3db020e0e..263a588f3cd3 100644
> > > --- a/include/linux/kvm_types.h
> > > +++ b/include/linux/kvm_types.h
> > > @@ -118,6 +118,7 @@ struct kvm_vcpu_stat_generic {
> > > u64 halt_poll_fail_hist[HALT_POLL_HIST_COUNT];
> > > u64 halt_wait_hist[HALT_POLL_HIST_COUNT];
> > > u64 blocking;
> > > + u64 pages_dirtied;
> > I am reworking the QEMU patches and I am not sure how I can access the
> > pages_dirtied info from the userspace side when the migration starts, i.e.
> > without a dirty quota exit.
> >
> > I need this info to initialise the dirty quota. This is what I am looking
> > to do on the userspace side at the start of dirty quota migration:
> > dirty_quota = pages_dirtied + some initial quota
> >
> > Hoping if you could help, Sean. Thanks in advance.
> I think I can set dirty_quota initially to 1 and let the vpcu exit with exit
> reason KVM_EXIT_DIRTY_QUOTA_EXHAUSTED. Then, I can set the quota.
The vCPU doesn't need to be paused to read stats, pages_dirtied can be read while
the vCPU is running via KVM_GET_STATS_FD. Though at a glance, QEMU doesn't yet
utilize KVM_GETS_STATS_FD, i.e. QEMU would a need a decent chunk of infrastructure
improvements to avoid the unnecessary exit.
next prev parent reply other threads:[~2022-10-19 16:02 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-15 10:10 [PATCH v6 0/5] KVM: Dirty quota-based throttling Shivam Kumar
2022-09-15 10:10 ` [PATCH v6 1/5] KVM: Implement dirty quota-based throttling of vcpus Shivam Kumar
2022-09-15 13:21 ` Christian Borntraeger
2022-09-15 14:34 ` Christian Borntraeger
2022-10-07 18:18 ` Sean Christopherson
2022-10-09 18:36 ` Shivam Kumar
2022-10-10 6:12 ` Christian Borntraeger
2022-10-07 19:08 ` Sean Christopherson
2022-10-07 19:20 ` Sean Christopherson
2022-10-09 18:49 ` Shivam Kumar
2022-10-10 16:09 ` Sean Christopherson
2022-10-09 19:30 ` Shivam Kumar
2022-10-10 5:41 ` Shivam Kumar
2022-10-17 5:28 ` Shivam Kumar
2022-10-19 16:01 ` Sean Christopherson [this message]
2022-09-15 10:10 ` [PATCH v6 2/5] KVM: x86: Dirty " Shivam Kumar
2022-10-07 19:30 ` Sean Christopherson
2022-10-09 19:05 ` Shivam Kumar
2022-10-18 17:43 ` Shivam Kumar
2022-10-19 15:42 ` Sean Christopherson
2022-10-09 19:17 ` Shivam Kumar
2022-09-15 10:10 ` [PATCH v6 3/5] KVM: arm64: " Shivam Kumar
2022-09-15 10:10 ` [PATCH v6 4/5] KVM: s390x: " Shivam Kumar
2022-09-15 13:24 ` Christian Borntraeger
2022-09-15 10:10 ` [PATCH v6 5/5] KVM: selftests: Add selftests for dirty quota throttling Shivam Kumar
2022-10-07 18:29 ` Sean Christopherson
2022-10-09 19:26 ` Shivam Kumar
2022-10-10 15:47 ` Sean Christopherson
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=Y1AfT4GAtz79h7oV@google.com \
--to=seanjc@google.com \
--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=maz@kernel.org \
--cc=pbonzini@redhat.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 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).