[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v10 3/3] cpus-common: implement dirty page limit on virtual C
From: |
Peter Xu |
Subject: |
Re: [PATCH v10 3/3] cpus-common: implement dirty page limit on virtual CPU |
Date: |
Thu, 16 Dec 2021 14:22:57 +0800 |
On Wed, Dec 15, 2021 at 02:41:32PM +0100, Markus Armbruster wrote:
> Peter Xu <peterx@redhat.com> writes:
>
> > On Wed, Dec 15, 2021 at 03:56:55PM +0800, Hyman Huang wrote:
> >> > > +{ 'command': 'vcpu-dirty-limit',
> >> > > + 'data': { 'enable': 'bool',
> >> > > + '*cpu-index': 'uint64',
> >> > > + '*dirty-rate': 'uint64'} }
> >> >
> >> > Drop @enable, please.
> >> >
> >> > If @dirty-rate is present, set the limit to its value.
> >> >
> >> > If it's absent, cancel the limit.
> >> >
> >> Ok. Indeed, this is the simplest style. :)
> >>
> >> So the final qmp format should be like:
> >>
> >> case 1: setup vcpu 0 dirty page limit 100MB/s
> >> vcpu-dirty-limit cpu-index=0 dirty-rate=100MB/s
> >>
> >> case 2: cancle vcpu 0 dirty page limit
> >> vcpu-dirty-limit cpu-index=0
> >
> > I actually agree with what you said... for human beings no one will read it
> > as
> > "disable vcpu throttling", instead people could consider it enables vcpu
> > throttle with a default dirty rate from a gut feeling.
> >
> > I think what Markus suggested is the simplest solution for computers, but it
> > can confuse human beings. So it turns out to be a general question to QMP
> > scheme design: should we always assume QMP client to be a piece of
> > software, or
> > should we still consider the feeling of human beings operating on QMP
> > interfaces using qmp-shell.
> >
> > IMHO we should still consider the latter, if we don't lose much, anyway.
> > But I
> > don't have a strong opinion.
>
> If you want a more explicit interface, then I'd recommend to go right
> back to v7:
>
> {"execute": "set-vcpu-dirty-limit",
> "arguments": {"cpu-index": 0, "dirtyrate": 200}}
>
> {"execute": "cancel-vcpu-dirty-limit",
> "arguments": {"cpu-index": 0}}
>
> Bonus: it already has my Acked-by.
Fair enough. :) That looks good to me too.
Yong, please hold-off a bit on reposting (if there's a plan) - I'll read the
other parts soon..
Thanks,
--
Peter Xu
- [PATCH v10 1/3] migration/dirtyrate: implement vCPU dirtyrate calculation periodically, (continued)
- [PATCH v10 1/3] migration/dirtyrate: implement vCPU dirtyrate calculation periodically, huangy81, 2021/12/14
- [PATCH v10 3/3] cpus-common: implement dirty page limit on virtual CPU, huangy81, 2021/12/14
- Re: [PATCH v10 3/3] cpus-common: implement dirty page limit on virtual CPU, Markus Armbruster, 2021/12/15
- Re: [PATCH v10 3/3] cpus-common: implement dirty page limit on virtual CPU, Markus Armbruster, 2021/12/15
- Re: [PATCH v10 3/3] cpus-common: implement dirty page limit on virtual CPU,
Peter Xu <=
- Re: [PATCH v10 3/3] cpus-common: implement dirty page limit on virtual CPU, Hyman Huang, 2021/12/16
- Re: [PATCH v10 3/3] cpus-common: implement dirty page limit on virtual CPU, Markus Armbruster, 2021/12/16
- Re: [PATCH v10 3/3] cpus-common: implement dirty page limit on virtual CPU, Peter Xu, 2021/12/24
Re: [PATCH v10 3/3] cpus-common: implement dirty page limit on virtual CPU, Peter Xu, 2021/12/24
Re: [PATCH v10 0/3] support dirty restraint on vCPU, Peter Xu, 2021/12/24