All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: "Eduardo Habkost" <eduardo@habkost.net>,
	"David Hildenbrand" <david@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Juan Quintela" <quintela@redhat.com>,
	"Hyman Huang" <huangy81@chinatelecom.cn>,
	qemu-devel <qemu-devel@nongnu.org>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [PATCH v10 3/3] cpus-common: implement dirty page limit on virtual CPU
Date: Wed, 15 Dec 2021 14:41:32 +0100	[thread overview]
Message-ID: <87y24m2df7.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <Ybmiw59Qh3sHukyh@xz-m1.local> (Peter Xu's message of "Wed, 15 Dec 2021 16:09:39 +0800")

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.



  parent reply	other threads:[~2021-12-15 14:19 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-14 11:07 [PATCH v10 0/3] support dirty restraint on vCPU huangy81
2021-12-14 11:07 ` [PATCH v10 1/3] migration/dirtyrate: implement vCPU dirtyrate calculation periodically huangy81
2021-12-23 11:12   ` Peter Xu
2021-12-26 15:58     ` Hyman
2021-12-30  5:01     ` Hyman Huang
2021-12-30  6:34       ` Peter Xu
2021-12-14 11:07 ` [PATCH v10 2/3] cpu-throttle: implement virtual CPU throttle huangy81
2021-12-15  7:15   ` Markus Armbruster
2021-12-15  7:40     ` Hyman Huang
2021-12-24  5:12   ` Peter Xu
2021-12-30 16:36     ` Hyman Huang
2022-01-04  2:32       ` Peter Xu
2022-01-04  3:27         ` Hyman Huang
2022-01-13 16:22         ` Markus Armbruster
2022-01-14  1:30           ` Hyman Huang
2022-01-14  3:35             ` Peter Xu
2021-12-14 11:07 ` [PATCH v10 3/3] cpus-common: implement dirty page limit on virtual CPU huangy81
2021-12-15  7:37   ` Markus Armbruster
2021-12-15  7:56     ` Hyman Huang
2021-12-15  8:09       ` Peter Xu
2021-12-15  8:29         ` Hyman Huang
2021-12-15 10:16           ` Hyman Huang
2021-12-15 13:41         ` Markus Armbruster [this message]
2021-12-16  6:22           ` Peter Xu
2021-12-16  9:16             ` Hyman Huang
2021-12-16 10:23               ` Markus Armbruster
2021-12-24  5:16                 ` Peter Xu
2021-12-24  5:14   ` Peter Xu
2021-12-26 16:00     ` Hyman
2021-12-24  5:17 ` [PATCH v10 0/3] support dirty restraint on vCPU Peter Xu

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=87y24m2df7.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=david@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=huangy81@chinatelecom.cn \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=richard.henderson@linaro.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 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.