[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 9/9] throttle: add name of ThrottleGroup to Bloc
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-devel] [PATCH 9/9] throttle: add name of ThrottleGroup to BlockDeviceInfo |
Date: |
Thu, 26 Feb 2015 14:56:06 +0100 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Wed, Feb 25, 2015 at 08:23:10AM -0700, Eric Blake wrote:
> How about query-block-throttle, returning an array of dicts.
>
> => { "execute":"query-block-throttle" }
> <= { "return": [
> { "name": "throttle1", "bps_max": 100000,
> "nodes": [ "block0", "block1" ] },
> { "name": "throttle2", "iops_max": 10000,
> "nodes": [ "block2" ] }
> ] }
Ok I wrote it, however I have some doubts about what to put exactly in
the 'nodes' array.
We can just put node names as you suggest, however at the moment not
all nodes have a name so we could end up with a list of empty strings.
I think the easiest solution in terms of lines of code and simplicity
of the return type is this one:
{ 'type': 'ThrottleGroupInfo',
'data': { 'name': 'str', 'nodes': ['BlockDeviceInfo'] } }
{ 'command': 'query-block-throttle',
'returns': ['ThrottleGroupInfo'] }
All the information is there, the code to fill the BlockDeviceInfo
structure is already written so I can just make use of it.
The throttling settings themselves are not present in
ThrottleGroupInfo, but since all nodes from a group have the same
settings, you can get them from any of them. It also keeps the
ThrottleGroupInfo structure simpler.
What do you think? If you're ok with this solution I can submit the
patch series again.
Berto
- [Qemu-devel] [PATCH 6/9] throttle: Add a way to fire one of the timers asap like a bottom half, (continued)
[Qemu-devel] [PATCH 4/9] throttle: Prepare to have multiple timers for one ThrottleState, Alberto Garcia, 2015/02/13
[Qemu-devel] [PATCH 5/9] throttle: Add a way to know if throttle_schedule_timer had armed a timer, Alberto Garcia, 2015/02/13
[Qemu-devel] [PATCH 7/9] throttle: Add throttle group support, Alberto Garcia, 2015/02/13
[Qemu-devel] [PATCH 2/9] throttle: Add throttle group infrastructure, Alberto Garcia, 2015/02/13
[Qemu-devel] [PATCH 1/9] throttle: Extract timers from ThrottleState into a separate ThrottleTimers structure, Alberto Garcia, 2015/02/13