On Mon, Mar 17, 2014 at 4:12 AM, Fam Zheng <f...@redhat.com> wrote: > On Fri, 03/14 16:57, Benoît Canet wrote: >> I discussed a bit with Stefan on the list and we came to the conclusion that >> the >> block filter API need group support. >> >> filter group: >> ------------- >> >> My current plan to implement this is to add the following fields to the >> BlockDriver >> structure. >> >> int bdrv_add_filter_group(const char *name, QDict options); >> int bdrv_reconfigure_filter_group(const char *name, QDict options); >> int bdrv_destroy_filter_group(const char *name); >> >> These three extra method would allow to create, reconfigure or destroy a >> block >> filter group. A block filter group contain the shared or non shared state of >> the >> blockfilter. For throttling it would contains the ThrottleState structure. >> >> Each block filter driver would contains a linked list of linked list where >> the >> BDS are registered grouped by filter groups state. > > Sorry I don't fully understand this. Does a filter group contain multiple > block > filters, and every block filter has effect on multiple BDSes? Could you give > an > example?
Just to why a "group" mechanism is useful: You want to impose a 2000 IOPS limit for the entire VM. Currently this is not possible because each drive has its own throttling state. We need a way to say certain drives are part of a group. All drives in a group share the same throttling state and therefore a 2000 IOPS limit is shared amongst them. Whether this concept is common enough to warrant a generic "filter group" API, I'm not sure. But we at least need this for I/O throttling. Stefan