Message ID | 1493735386-39622-2-git-send-email-pradeep.jagadeesh@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 05/02/2017 09:29 AM, Pradeep Jagadeesh wrote: > This patchset introduces a new io throttle structure. This will be > used in both block and fsdev devices. > > Signed-off-by: Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com> > --- > qapi/block-core.json | 76 ++-------------------------------------------- > qapi/iothrottle.json | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 89 insertions(+), 73 deletions(-) > create mode 100644 qapi/iothrottle.json > Reviewed-by: Eric Blake <eblake@redhat.com>
s/Throttle/throttle On Tue, 2 May 2017 10:29:43 -0400 Pradeep Jagadeesh <pradeepkiruvale@gmail.com> wrote: > This patchset introduces a new io throttle structure. This will be s/patchset/patch > used in both block and fsdev devices. > > Signed-off-by: Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com> > --- Reviewed-by: Greg Kurz <groug@kaod.org> > qapi/block-core.json | 76 ++-------------------------------------------- > qapi/iothrottle.json | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 89 insertions(+), 73 deletions(-) > create mode 100644 qapi/iothrottle.json > > diff --git a/qapi/block-core.json b/qapi/block-core.json > index 87fb747..93d346b 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: > @@ -1760,84 +1761,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..124ab40 > --- /dev/null > +++ b/qapi/iothrottle.json > @@ -0,0 +1,86 @@ > +# -*- Mode: Python -*- > + > +## > +# == QAPI IOThrottle definitions > +## > +# @IOThrottle: > +# > +# A set of parameters describing iothrottle s/iothrottle/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' } }
On 5/3/2017 8:22 AM, Greg Kurz wrote: > s/Throttle/throttle > > On Tue, 2 May 2017 10:29:43 -0400 > Pradeep Jagadeesh <pradeepkiruvale@gmail.com> wrote: > >> This patchset introduces a new io throttle structure. This will be > > s/patchset/patch OK > >> used in both block and fsdev devices. >> >> Signed-off-by: Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com> >> --- > > Reviewed-by: Greg Kurz <groug@kaod.org> OK > >> qapi/block-core.json | 76 ++-------------------------------------------- >> qapi/iothrottle.json | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++ >> 2 files changed, 89 insertions(+), 73 deletions(-) >> create mode 100644 qapi/iothrottle.json >> >> diff --git a/qapi/block-core.json b/qapi/block-core.json >> index 87fb747..93d346b 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: >> @@ -1760,84 +1761,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..124ab40 >> --- /dev/null >> +++ b/qapi/iothrottle.json >> @@ -0,0 +1,86 @@ >> +# -*- Mode: Python -*- >> + >> +## >> +# == QAPI IOThrottle definitions >> +## >> +# @IOThrottle: >> +# >> +# A set of parameters describing iothrottle > > s/iothrottle/IO throttling/ I completely taken off that sentence. > >> +# >> +# @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' } } >
On Wed, 3 May 2017 16:19:20 +0200 Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com> wrote: > On 5/3/2017 8:22 AM, Greg Kurz wrote: > > s/Throttle/throttle > > > > On Tue, 2 May 2017 10:29:43 -0400 > > Pradeep Jagadeesh <pradeepkiruvale@gmail.com> wrote: > > > >> This patchset introduces a new io throttle structure. This will be > > > > s/patchset/patch > OK > > > >> used in both block and fsdev devices. > >> > >> Signed-off-by: Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com> > >> --- > > > > Reviewed-by: Greg Kurz <groug@kaod.org> > OK > > > >> qapi/block-core.json | 76 ++-------------------------------------------- > >> qapi/iothrottle.json | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++ > >> 2 files changed, 89 insertions(+), 73 deletions(-) > >> create mode 100644 qapi/iothrottle.json > >> > >> diff --git a/qapi/block-core.json b/qapi/block-core.json > >> index 87fb747..93d346b 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: > >> @@ -1760,84 +1761,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..124ab40 > >> --- /dev/null > >> +++ b/qapi/iothrottle.json > >> @@ -0,0 +1,86 @@ > >> +# -*- Mode: Python -*- > >> + > >> +## > >> +# == QAPI IOThrottle definitions > >> +## > >> +# @IOThrottle: > >> +# > >> +# A set of parameters describing iothrottle > > > > s/iothrottle/IO throttling/ > I completely taken off that sentence. Hmm... I guess we still want a short description, like any other structure. > > > >> +# > >> +# @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' } } > >
diff --git a/qapi/block-core.json b/qapi/block-core.json index 87fb747..93d346b 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: @@ -1760,84 +1761,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..124ab40 --- /dev/null +++ b/qapi/iothrottle.json @@ -0,0 +1,86 @@ +# -*- Mode: Python -*- + +## +# == QAPI IOThrottle definitions +## +# @IOThrottle: +# +# A set of parameters describing iothrottle +# +# @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' } }
This patchset introduces a new io throttle structure. This will be used in both block and fsdev devices. Signed-off-by: Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com> --- qapi/block-core.json | 76 ++-------------------------------------------- qapi/iothrottle.json | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 73 deletions(-) create mode 100644 qapi/iothrottle.json