From: "Benoît Canet" <benoit.canet@irqsave.net>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, stefanha@redhat.com, mreitz@redhat.com
Subject: [Qemu-devel] n ways block filters
Date: Fri, 14 Mar 2014 16:57:56 +0100 [thread overview]
Message-ID: <20140314155756.GC3324@irqsave.net> (raw)
Hello list,
I plan to convert throttling to a block filter and write n way throttling
support.
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.
The regular bdrv_open callback would be used to instantiate a block filter and
add it to a filter group. This method would also take a new-node-name for the new
filter. This node-name would become the name of the new filter.
bdrv_close would cleanup and deregister from a filter group.
An extra filter-group field in the option dict would allow the bdrv_open method
to register the newly opened block filter in it's filter group.
The BDS structure would have a direct pointer to it's filter group state.
Utility methods to do the bdrv_add_filter_group bdrv_open then bdrv_swap to
install a new filter can be provided by block.c. The same can be done for filter
close and desinstallation.
Legacy throttling QMP API
-------------------------
The legacy throttling API would create throttling filters groups containing only
one BDS.
By default for every 1 way block filter block.c would create a filter group
using the BDS id or node-name as group name. This allow for easy filer removal
with the bds reference.
Group throttling API
--------------------
Commands would be added to create throttling filter groups reconfigure and remove
them.
Two additional commands would be added to create and insert a block filter in a
given group or close and remove it.
Before I start implementing something what are your thougths on this ?
Best regards
Benoît
next reply other threads:[~2014-03-14 15:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-14 15:57 Benoît Canet [this message]
2014-03-17 3:12 ` [Qemu-devel] n ways block filters Fam Zheng
2014-03-17 13:52 ` Benoît Canet
2014-03-17 16:02 ` Stefan Hajnoczi
2014-03-18 13:27 ` Kevin Wolf
2014-03-20 14:05 ` Benoît Canet
2014-03-20 15:12 ` Kevin Wolf
2014-03-20 15:47 ` Benoît Canet
2014-03-20 16:06 ` Benoît Canet
2014-03-24 14:53 ` Benoît Canet
2014-03-24 15:58 ` Kevin Wolf
2014-03-27 15:49 ` Benoît Canet
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=20140314155756.GC3324@irqsave.net \
--to=benoit.canet@irqsave.net \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).