From: Kevin Wolf <kwolf@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: "Benoît Canet" <benoit.canet@irqsave.net>,
"Fam Zheng" <famz@redhat.com>, qemu-devel <qemu-devel@nongnu.org>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Max Reitz" <mreitz@redhat.com>
Subject: Re: [Qemu-devel] n ways block filters
Date: Tue, 18 Mar 2014 14:27:47 +0100 [thread overview]
Message-ID: <20140318132747.GN4607@noname.str.redhat.com> (raw)
In-Reply-To: <CAJSP0QWA4QZOU8p+0KRaCxNU6_6sHCepzRN=vMkdzACZj8FaHg@mail.gmail.com>
Am 17.03.2014 um 17:02 hat Stefan Hajnoczi geschrieben:
> On Mon, Mar 17, 2014 at 4:12 AM, Fam Zheng <famz@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);
Benoît, your mail left me puzzled. You didn't really describe the
problem that you're solving, nor what the QDict options actually
contains or what a filter group even is.
> >> 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.
Now at least I have an idea what you're all talking about, but it's
still not obvious to me how the three functions from above solve your
problem or how they work in detail.
The obvious solution, using often discussed blockdev-add concepts, is:
______________
virtio-blk_A --> | | --> qcow2_A --> raw-posix_A
| throttling |
virtio_blk_B --> |____________| --> qcow2_B --> nbd_B
That is, the I/O throttling BDS is referenced by two devices instead of
just one and it associates one 'input' with one 'output'. Once we have
BlockBackend, we would have two BBs, but still only one throttling
BDS.
The new thing that you get there is that the throttling driver has
not only multiple parents (that part exists today), but it behaves
differently depending on who called it. So we need to provide some way
for one BDS to expose multiple slots or whatever you want to call them
that users can attach to.
This is, by the way, the very same thing as would be required for
exposing qcow2 internal snapshots (read-only) while the VM is running.
Kevin
next prev parent reply other threads:[~2014-03-18 13:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-14 15:57 [Qemu-devel] n ways block filters Benoît Canet
2014-03-17 3:12 ` Fam Zheng
2014-03-17 13:52 ` Benoît Canet
2014-03-17 16:02 ` Stefan Hajnoczi
2014-03-18 13:27 ` Kevin Wolf [this message]
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=20140318132747.GN4607@noname.str.redhat.com \
--to=kwolf@redhat.com \
--cc=benoit.canet@irqsave.net \
--cc=famz@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--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).