All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com>
Cc: Pradeep Jagadeesh <pradeepkiruvale@gmail.com>,
	alberto garcia <berto@igalia.com>,
	jani kokkonen <jani.kokkonen@huawei.com>,
	greg kurz <groug@kaod.org>,
	qemu-devel@nongnu.org,
	Kevin Wolf <kwolf@redhat.com>Alberto Garcia <berto@igalia.com>
Subject: Re: [Qemu-devel] [PATCH v7 2/6] qmp: Create IOThrottle structure
Date: Mon, 07 Aug 2017 16:48:38 +0200	[thread overview]
Message-ID: <87shh3fn7d.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <61626c42-9c47-14e5-24b7-e6086d042a6b@huawei.com> (Pradeep Jagadeesh's message of "Mon, 7 Aug 2017 11:59:46 +0200")

Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com> writes:

> On 7/6/2017 7:55 PM, Markus Armbruster wrote:
>> Pradeep Jagadeesh <pradeepkiruvale@gmail.com> writes:
>>
>>> This patch enables qmp interfaces for the fsdev
>>> devices. This provides two interfaces one
>>> for querying info of all the fsdev devices. The second one
>>> to set the IO limits for the required fsdev device.
>>>
>>> Signed-off-by: Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com>
>>> Reviewed-by: Greg Kurz <groug@kaod.org>
>>> Reviewed-by: Eric Blake <eblake@redhat.com>
>>> Reviewed-by: Alberto Garcia <berto@igalia.com>
>>> ---
>>>  qapi/block-core.json | 76 ++-------------------------------------------
>>>  qapi/iothrottle.json | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>  2 files changed, 91 insertions(+), 73 deletions(-)
>>>  create mode 100644 qapi/iothrottle.json
>>>
>>> diff --git a/qapi/block-core.json b/qapi/block-core.json
>>> index f85c223..9320974 100644
>>> --- a/qapi/block-core.json
>>> +++ b/qapi/block-core.json
>>> @@ -6,6 +6,7 @@
>>>
>>>  # QAPI common definitions
>>>  { 'include': 'common.json' }
>>> +{ 'include': 'iothrottle.json' }
>>>
>>>  ##
>>>  # @SnapshotInfo:
>>> @@ -1761,84 +1762,13 @@
>>>  #
>>>  # @device: Block device name (deprecated, use @id instead)
>>>  #
>>> -# @id: The name or QOM path of the guest device (since: 2.8)
>>> -#
>>> -# @bps: total throughput limit in bytes per second
>>> -#
>>> -# @bps_rd: read throughput limit in bytes per second
>>> -#
>>> -# @bps_wr: write throughput limit in bytes per second
>>> -#
>>> -# @iops: total I/O operations per second
>>> -#
>>> -# @iops_rd: read I/O operations per second
>>> -#
>>> -# @iops_wr: write I/O operations per second
>>> -#
>>> -# @bps_max: total throughput limit during bursts,
>>> -#                     in bytes (Since 1.7)
>>> -#
>>> -# @bps_rd_max: read throughput limit during bursts,
>>> -#                        in bytes (Since 1.7)
>>> -#
>>> -# @bps_wr_max: write throughput limit during bursts,
>>> -#                        in bytes (Since 1.7)
>>> -#
>>> -# @iops_max: total I/O operations per second during bursts,
>>> -#                      in bytes (Since 1.7)
>>> -#
>>> -# @iops_rd_max: read I/O operations per second during bursts,
>>> -#                         in bytes (Since 1.7)
>>> -#
>>> -# @iops_wr_max: write I/O operations per second during bursts,
>>> -#                         in bytes (Since 1.7)
>>> -#
>>> -# @bps_max_length: maximum length of the @bps_max burst
>>> -#                            period, in seconds. It must only
>>> -#                            be set if @bps_max is set as well.
>>> -#                            Defaults to 1. (Since 2.6)
>>> -#
>>> -# @bps_rd_max_length: maximum length of the @bps_rd_max
>>> -#                               burst period, in seconds. It must only
>>> -#                               be set if @bps_rd_max is set as well.
>>> -#                               Defaults to 1. (Since 2.6)
>>> -#
>>> -# @bps_wr_max_length: maximum length of the @bps_wr_max
>>> -#                               burst period, in seconds. It must only
>>> -#                               be set if @bps_wr_max is set as well.
>>> -#                               Defaults to 1. (Since 2.6)
>>> -#
>>> -# @iops_max_length: maximum length of the @iops burst
>>> -#                             period, in seconds. It must only
>>> -#                             be set if @iops_max is set as well.
>>> -#                             Defaults to 1. (Since 2.6)
>>> -#
>>> -# @iops_rd_max_length: maximum length of the @iops_rd_max
>>> -#                                burst period, in seconds. It must only
>>> -#                                be set if @iops_rd_max is set as well.
>>> -#                                Defaults to 1. (Since 2.6)
>>> -#
>>> -# @iops_wr_max_length: maximum length of the @iops_wr_max
>>> -#                                burst period, in seconds. It must only
>>> -#                                be set if @iops_wr_max is set as well.
>>> -#                                Defaults to 1. (Since 2.6)
>>> -#
>>> -# @iops_size: an I/O size in bytes (Since 1.7)
>>> -#
>>>  # @group: throttle group name (Since 2.4)
>>>  #
>>>  # Since: 1.1
>>>  ##
>>>  { 'struct': 'BlockIOThrottle',
>>> -  'data': { '*device': 'str', '*id': 'str', 'bps': 'int', 'bps_rd': 'int',
>>> -            'bps_wr': 'int', 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
>>> -            '*bps_max': 'int', '*bps_rd_max': 'int',
>>> -            '*bps_wr_max': 'int', '*iops_max': 'int',
>>> -            '*iops_rd_max': 'int', '*iops_wr_max': 'int',
>>> -            '*bps_max_length': 'int', '*bps_rd_max_length': 'int',
>>> -            '*bps_wr_max_length': 'int', '*iops_max_length': 'int',
>>> -            '*iops_rd_max_length': 'int', '*iops_wr_max_length': 'int',
>>> -            '*iops_size': 'int', '*group': 'str' } }
>>> +  'base': 'IOThrottle',
>>> +  'data': { '*device': 'str', '*group': 'str' } }
>>>
>>>  ##
>>>  # @block-stream:
>>> diff --git a/qapi/iothrottle.json b/qapi/iothrottle.json
>>> new file mode 100644
>>> index 0000000..0f067c3
>>> --- /dev/null
>>> +++ b/qapi/iothrottle.json
>>> @@ -0,0 +1,88 @@
>>> +# -*- Mode: Python -*-
>>> +
>>> +##
>>> +# == QAPI IOThrottle definitions
>>> +##
>>> +
>>> +##
>>> +# @IOThrottle:
>>> +#
>>> +# A set of parameters describing IO throttling
>>> +#
>>> +# @id: The name or QOM path of the guest device (since: 2.8)
>>> +#
>>> +# @bps: total throughput limit in bytes per second
>>> +#
>>> +# @bps_rd: read throughput limit in bytes per second
>>> +#
>>> +# @bps_wr: write throughput limit in bytes per second
>>> +#
>>> +# @iops: total I/O operations per second
>>> +#
>>> +# @iops_rd: read I/O operations per second
>>> +#
>>> +# @iops_wr: write I/O operations per second
>>> +#
>>> +# @bps_max: total throughput limit during bursts,
>>> +#                     in bytes (Since 1.7)
>>> +#
>>> +# @bps_rd_max: read throughput limit during bursts,
>>> +#                        in bytes (Since 1.7)
>>> +#
>>> +# @bps_wr_max: write throughput limit during bursts,
>>> +#                        in bytes (Since 1.7)
>>> +#
>>> +# @iops_max: total I/O operations per second during bursts,
>>> +#                      in bytes (Since 1.7)
>>> +#
>>> +# @iops_rd_max: read I/O operations per second during bursts,
>>> +#                         in bytes (Since 1.7)
>>> +#
>>> +# @iops_wr_max: write I/O operations per second during bursts,
>>> +#                         in bytes (Since 1.7)
>>> +#
>>> +# @bps_max_length: maximum length of the @bps_max burst
>>> +#                            period, in seconds. It must only
>>> +#                            be set if @bps_max is set as well.
>>> +#                            Defaults to 1. (Since 2.6)
>>> +#
>>> +# @bps_rd_max_length: maximum length of the @bps_rd_max
>>> +#                               burst period, in seconds. It must only
>>> +#                               be set if @bps_rd_max is set as well.
>>> +#                               Defaults to 1. (Since 2.6)
>>> +#
>>> +# @bps_wr_max_length: maximum length of the @bps_wr_max
>>> +#                               burst period, in seconds. It must only
>>> +#                               be set if @bps_wr_max is set as well.
>>> +#                               Defaults to 1. (Since 2.6)
>>> +#
>>> +# @iops_max_length: maximum length of the @iops burst
>>> +#                             period, in seconds. It must only
>>> +#                             be set if @iops_max is set as well.
>>> +#                             Defaults to 1. (Since 2.6)
>>> +#
>>> +# @iops_rd_max_length: maximum length of the @iops_rd_max
>>> +#                                burst period, in seconds. It must only
>>> +#                                be set if @iops_rd_max is set as well.
>>> +#                                Defaults to 1. (Since 2.6)
>>> +#
>>> +# @iops_wr_max_length: maximum length of the @iops_wr_max
>>> +#                                burst period, in seconds. It must only
>>> +#                                be set if @iops_wr_max is set as well.
>>> +#                                Defaults to 1. (Since 2.6)
>>> +#
>>> +# @iops_size: an I/O size in bytes (Since 1.7)
>>> +#
>>> +#
>>> +# Since: 2.10
>>> +##
>>> +{ 'struct': 'IOThrottle',
>>> +  'data': { '*id': 'str', 'bps': 'int', 'bps_rd': 'int',
>>> +            'bps_wr': 'int', 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
>>> +            '*bps_max': 'int', '*bps_rd_max': 'int',
>>> +            '*bps_wr_max': 'int', '*iops_max': 'int',
>>> +            '*iops_rd_max': 'int', '*iops_wr_max': 'int',
>>> +            '*bps_max_length': 'int', '*bps_rd_max_length': 'int',
>>> +            '*bps_wr_max_length': 'int', '*iops_max_length': 'int',
>>> +            '*iops_rd_max_length': 'int', '*iops_wr_max_length': 'int',
>>> +            '*iops_size': 'int' } }
>>
>> Awkward question for a v7, but here goes anyway: why is IOThrottle worth
>> its very own .json file?
> I feel this is a common throttle structure that is used by block
> devices as well as fsdev, so moved to a separate file.

I'm not sure that's a good idea.  Kevin, Berto, what do you think?

>
> -Pradeep
>>
>> Diff can't show the differences (if any), because you factor IOThrottle
>> out of BlockIOThrottle and move it in a single patch.  I had to extract
>> and diff by hand.
>>

  reply	other threads:[~2017-08-07 14:48 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-04 15:30 [Qemu-devel] [PATCH v7 0/6] fsdev: qmp interface for io throttling Pradeep Jagadeesh
2017-07-04 15:30 ` [Qemu-devel] [PATCH v7 1/6] throttle: factor out duplicate code Pradeep Jagadeesh
2017-07-10 14:33   ` Greg Kurz
2017-07-10 14:41   ` Eric Blake
2017-08-07  9:44     ` Pradeep Jagadeesh
2017-07-04 15:30 ` [Qemu-devel] [PATCH v7 2/6] qmp: Create IOThrottle structure Pradeep Jagadeesh
2017-07-06 17:55   ` Markus Armbruster
2017-08-07  9:59     ` Pradeep Jagadeesh
2017-08-07 14:48       ` Markus Armbruster [this message]
2017-08-08 11:30         ` Alberto Garcia
2017-08-08 12:30           ` Pradeep Jagadeesh
2017-08-08 14:33             ` Alberto Garcia
2017-08-08 15:18               ` Markus Armbruster
2017-08-10 14:06                 ` Pradeep Jagadeesh
2017-08-10 15:14                   ` Eric Blake
2017-08-10 16:25                     ` Markus Armbruster
2017-08-16 16:13                       ` Markus Armbruster
2017-08-16 17:13                         ` Eric Blake
2017-08-16 18:11                           ` Markus Armbruster
     [not found]                             ` <CAJ2SuLnH9dvfWs1XX-Pd+GE9s0kZP_3LkMs_Crt9QTkz48NsyA@mail.gmail.com>
     [not found]                               ` <CAJ2SuL=F3oAA6KbURSQRaqNS_DPSZ7tGOjgEcgNkfzdXxw7tTQ@mail.gmail.com>
2017-08-19  1:16                                 ` Pradeep Kiruvale
2017-07-04 15:31 ` [Qemu-devel] [PATCH v7 3/6] throttle: move out function to reuse the code Pradeep Jagadeesh
2017-07-04 15:31 ` [Qemu-devel] [PATCH v7 4/6] hmp: create a throttle initialization function for code reusability Pradeep Jagadeesh
2017-07-04 15:31 ` [Qemu-devel] [PATCH v7 5/6] fsdev: hmp interface for throttling Pradeep Jagadeesh
2017-07-05 10:45   ` Dr. David Alan Gilbert
2017-07-06 18:15   ` Markus Armbruster
2017-08-07  9:57     ` Pradeep Jagadeesh
2017-07-04 15:31 ` [Qemu-devel] [PATCH v7 6/6] fsdev: QMP " Pradeep Jagadeesh
2017-07-06 18:47   ` Markus Armbruster
2017-07-07 14:50     ` Pradeep Jagadeesh
2017-08-07  9:35     ` Pradeep Jagadeesh
2017-08-07 14:54       ` Markus Armbruster
2017-07-07  6:14 ` [Qemu-devel] [PATCH v7 0/6] fsdev: qmp interface for io throttling Markus Armbruster
2017-07-07  6:24   ` Markus Armbruster
2017-07-07 13:16   ` Pradeep Jagadeesh
2017-08-07  7:52   ` Pradeep Jagadeesh
2017-08-07 14:55     ` Markus Armbruster
2017-07-14 12:22 ` Manos Pitsidianakis
2017-07-14 13:15   ` Pradeep Jagadeesh
2017-07-14 14:26     ` Manos Pitsidianakis
2017-07-14 15:27       ` Pradeep Jagadeesh

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=87shh3fn7d.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=berto@igalia.com \
    --cc=groug@kaod.org \
    --cc=jani.kokkonen@huawei.com \
    --cc=kwolf@redhat.com \
    --cc=pradeep.jagadeesh@huawei.com \
    --cc=pradeepkiruvale@gmail.com \
    --cc=qemu-devel@nongnu.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.