qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Zhenyu Ye <yezhenyu2@huawei.com>
Cc: Markus Armbruster <armbru@redhat.com>,
	dgilbert@redhat.com, xiexiangyou@huawei.com,
	qemu-devel@nongnu.org, jiangyiwen <jiangyiwen@huawei.com>,
	stefanha@redhat.com, pbonzini@redhat.com
Subject: Re: [RFC PATCH] iothread: add set_iothread_poll_* commands
Date: Tue, 22 Oct 2019 21:40:29 -0500	[thread overview]
Message-ID: <db460e9c-8bd5-d08b-fc06-3f0d1e11b75b@redhat.com> (raw)
In-Reply-To: <5DAFBAD5.9040409@huawei.com>

On 10/22/19 9:28 PM, Zhenyu Ye wrote:

> I will change the name argument to ENUM, such as,
> 
>      { 'enum': 'IothreadPollProperty',
>        'data': [ 'max-ns', 'grow', 'shrink' ] }
> 

> 
> ok, I will correct it, such as,
> 
>      { 'command': 'set-iothread-poll-param',
>      'data': {'iothread-id': 'str', 'name': 'IothreadPollProperty', 'value': 'int'} }
> 

That's one approach.  But another approach would be:

{ 'command': 'set-iothread-poll-params',
   'data': { 'iothread-id': 'str',
             '*max-ns': 'int', '*grow': 'int', '*shrink': 'int' } }

The difference on the wire is between:

{ "execute": "set-iothread-poll-param",
   "arguments": { "iothread-id": "thr1",
     "name": "max-ns", "value": 1000 } }
{ "execute": "set-iothread-poll-param",
   "arguments": { "iothread-id": "thr1",
     "name": "grow", "value": 100 } }

vs.

{ "execute": "set-iothread-poll-params",
   "arguments': { "iothread-id": "thr1",
      "max-ns": 1000, "grow": 100 } }

I'll leave it up to Markus to give guidance on which style is nicer.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



  reply	other threads:[~2019-10-23  2:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-22  8:12 [RFC PATCH] iothread: add set_iothread_poll_* commands yezhenyu (A)
2019-10-22  8:51 ` Dr. David Alan Gilbert
2019-10-22 14:18   ` Zhenyu Ye
2019-10-22 14:27     ` Dr. David Alan Gilbert
2019-10-22 20:40 ` Eric Blake
2019-10-23  2:28   ` Zhenyu Ye
2019-10-23  2:40     ` Eric Blake [this message]
2019-10-23 15:19 ` Stefan Hajnoczi
2019-10-24 13:53   ` Zhenyu Ye
2019-10-24 13:56     ` Dr. David Alan Gilbert
2019-10-24 14:34       ` Zhenyu Ye
2019-10-24 14:38         ` Dr. David Alan Gilbert
2019-10-25  2:07           ` Zhenyu Ye
2019-10-25 11:51             ` Stefan Hajnoczi

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=db460e9c-8bd5-d08b-fc06-3f0d1e11b75b@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=jiangyiwen@huawei.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=xiexiangyou@huawei.com \
    --cc=yezhenyu2@huawei.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).