qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] blockdev-add I/O throttling parameters
@ 2017-02-20 15:30 Stefan Hajnoczi
  2017-02-20 15:45 ` Kevin Wolf
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Hajnoczi @ 2017-02-20 15:30 UTC (permalink / raw)
  To: Kevin Wolf, Max Reitz, Eric Blake; +Cc: qemu-block, qemu-devel, berto

[-- Attachment #1: Type: text/plain, Size: 580 bytes --]

I/O throttling parameters are missing from blockdev-add.  Is this
intentional?

I can imagine two solutions that do not need these parameters in
blockdev-add:

1. I/O throttling is implemented by a BlockDriver.  Users are expected
   to create the BDS themselves.  This is a little awkward since
   query-block *does* include the throttling parameters in its output
   and we must preserve this behavior for existing users.

2. block_set_io_throttle must be used after blockdev-add.  Suboptimal
   because issuing two commands is not atomic (use transaction?).

Thoughts?

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] blockdev-add I/O throttling parameters
  2017-02-20 15:30 [Qemu-devel] blockdev-add I/O throttling parameters Stefan Hajnoczi
@ 2017-02-20 15:45 ` Kevin Wolf
  2017-02-20 16:29   ` Alberto Garcia
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Wolf @ 2017-02-20 15:45 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: Max Reitz, Eric Blake, qemu-block, qemu-devel, berto

[-- Attachment #1: Type: text/plain, Size: 1143 bytes --]

Am 20.02.2017 um 16:30 hat Stefan Hajnoczi geschrieben:
> I/O throttling parameters are missing from blockdev-add.  Is this
> intentional?
> 
> I can imagine two solutions that do not need these parameters in
> blockdev-add:
> 
> 1. I/O throttling is implemented by a BlockDriver.  Users are expected
>    to create the BDS themselves.  This is a little awkward since
>    query-block *does* include the throttling parameters in its output
>    and we must preserve this behavior for existing users.
> 
> 2. block_set_io_throttle must be used after blockdev-add.  Suboptimal
>    because issuing two commands is not atomic (use transaction?).
> 
> Thoughts?

The existing I/O throttling code is working on BlockBackends, but
blockdev-add creates BlockDriverStates. So it can't possibly add
throttling parameters.

The currently recommended solution block_set_io_throttle. The other
option to control BB level thorttling would be to add qdev properties to
the block devices.

In the long term, I think going with 1. and moving throttling to the
block node level is the much nicer (and more flexible) option.

Kevin

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] blockdev-add I/O throttling parameters
  2017-02-20 15:45 ` Kevin Wolf
@ 2017-02-20 16:29   ` Alberto Garcia
  2017-02-21 11:17     ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
  0 siblings, 1 reply; 4+ messages in thread
From: Alberto Garcia @ 2017-02-20 16:29 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: Stefan Hajnoczi, Max Reitz, Eric Blake, qemu-block, qemu-devel

On Mon, Feb 20, 2017 at 04:45:54PM +0100, Kevin Wolf wrote:
> > I can imagine two solutions that do not need these parameters in
> > blockdev-add:
> > 
> > 1. I/O throttling is implemented by a BlockDriver.  Users are expected
> >    to create the BDS themselves.  This is a little awkward since
> >    query-block *does* include the throttling parameters in its output
> >    and we must preserve this behavior for existing users.
> > 
> > 2. block_set_io_throttle must be used after blockdev-add.  Suboptimal
> >    because issuing two commands is not atomic (use transaction?).
> 
> The existing I/O throttling code is working on BlockBackends, but
> blockdev-add creates BlockDriverStates. So it can't possibly add
> throttling parameters.
> 
> The currently recommended solution block_set_io_throttle. The
> other option to control BB level thorttling would be to add qdev
> properties to the block devices.
> 
> In the long term, I think going with 1. and moving throttling to the
> block node level is the much nicer (and more flexible) option.

Yeah I agree with Kevin.

Berto

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [Qemu-block] blockdev-add I/O throttling parameters
  2017-02-20 16:29   ` Alberto Garcia
@ 2017-02-21 11:17     ` Stefan Hajnoczi
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2017-02-21 11:17 UTC (permalink / raw)
  To: Alberto Garcia
  Cc: Kevin Wolf, qemu-devel, qemu-block, Stefan Hajnoczi, Max Reitz

[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]

On Mon, Feb 20, 2017 at 05:29:19PM +0100, Alberto Garcia wrote:
> On Mon, Feb 20, 2017 at 04:45:54PM +0100, Kevin Wolf wrote:
> > > I can imagine two solutions that do not need these parameters in
> > > blockdev-add:
> > > 
> > > 1. I/O throttling is implemented by a BlockDriver.  Users are expected
> > >    to create the BDS themselves.  This is a little awkward since
> > >    query-block *does* include the throttling parameters in its output
> > >    and we must preserve this behavior for existing users.
> > > 
> > > 2. block_set_io_throttle must be used after blockdev-add.  Suboptimal
> > >    because issuing two commands is not atomic (use transaction?).
> > 
> > The existing I/O throttling code is working on BlockBackends, but
> > blockdev-add creates BlockDriverStates. So it can't possibly add
> > throttling parameters.
> > 
> > The currently recommended solution block_set_io_throttle. The
> > other option to control BB level thorttling would be to add qdev
> > properties to the block devices.
> > 
> > In the long term, I think going with 1. and moving throttling to the
> > block node level is the much nicer (and more flexible) option.
> 
> Yeah I agree with Kevin.

Okay, thanks for clarifying.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-21 11:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-20 15:30 [Qemu-devel] blockdev-add I/O throttling parameters Stefan Hajnoczi
2017-02-20 15:45 ` Kevin Wolf
2017-02-20 16:29   ` Alberto Garcia
2017-02-21 11:17     ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi

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).