qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH] iothread: add set_iothread_poll_* commands


From: Eric Blake
Subject: Re: [RFC PATCH] iothread: add set_iothread_poll_* commands
Date: Tue, 22 Oct 2019 21:40:29 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

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 via email to

[Prev in Thread] Current Thread [Next in Thread]