All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v6 0/7] Block Throttle Group Support
@ 2015-03-30 16:19 Alberto Garcia
  2015-03-30 16:19 ` [Qemu-devel] [PATCH 1/7] throttle: Extract timers from ThrottleState into a separate structure Alberto Garcia
                   ` (6 more replies)
  0 siblings, 7 replies; 24+ messages in thread
From: Alberto Garcia @ 2015-03-30 16:19 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Alberto Garcia, Stefan Hajnoczi

This updates test-throttle.c following Stefan's advice to init the
QEMU main loop.

V6:
- Use qemu_init_main_loop() in the throttling tests to make sure that
  all BDS have an AioContext attached.


V5: https://lists.gnu.org/archive/html/qemu-devel/2015-03/msg05990.html
- Fixed and expanded the tests. There's a new one that checks that
  configuration changes affect the whole throttling group.

- Refactored the code a bit: new function schedule_next_request()

- any_timer_armed is now reset in throttle_group_config(), it was
  causing qemu-iotest 093 to fail.

- Documentation improvements


V4: https://lists.gnu.org/archive/html/qemu-devel/2015-03/msg05558.html
- All functions from the ThrottleGroup API now receive a BlockDriverState.

- The creation/destruction of ThrottleTimers is now handled internally.

- bdrv_io_limits_enable() no longer accepts NULL as a valid group name.

- No member of a group can access someone else's throttled_reqs queues
  anymore.

- No member of a group can access someone else's timers unless they
  have queued requests.

- After a timer is fired make sure that there was actually a request
  in the queue, and schedule a new one otherwise.

- Protect bdrv_swap() by locking the throttling group.

- throttle_group_co_io_limits_intercept() is now marked as a coroutine
  function.

- Documentation updates.


Regards,

Berto

Alberto Garcia (6):
  throttle: Add throttle group infrastructure
  throttle: Add throttle group infrastructure tests
  throttle: Add throttle group support
  throttle: acquire the ThrottleGroup lock in bdrv_swap()
  throttle: add the name of the ThrottleGroup to BlockDeviceInfo
  throttle: Update throttle infrastructure copyright

Benoît Canet (1):
  throttle: Extract timers from ThrottleState into a separate structure

 block.c                         | 101 ++++-----
 block/Makefile.objs             |   1 +
 block/qapi.c                    |   8 +-
 block/throttle-groups.c         | 489 ++++++++++++++++++++++++++++++++++++++++
 blockdev.c                      |  22 +-
 hmp.c                           |  10 +-
 include/block/block.h           |   3 +-
 include/block/block_int.h       |   7 +-
 include/block/throttle-groups.h |  46 ++++
 include/qemu/throttle.h         |  46 ++--
 qapi/block-core.json            |   8 +-
 qemu-options.hx                 |   1 +
 qmp-commands.hx                 |   3 +-
 tests/test-throttle.c           | 161 +++++++++----
 util/throttle.c                 |  81 ++++---
 15 files changed, 823 insertions(+), 164 deletions(-)
 create mode 100644 block/throttle-groups.c
 create mode 100644 include/block/throttle-groups.h

-- 
2.1.4

^ permalink raw reply	[flat|nested] 24+ messages in thread
* [Qemu-devel] [PATCH v5 0/7] Block Throttle Group Support
@ 2015-03-30 14:16 Alberto Garcia
  2015-03-30 14:16 ` [Qemu-devel] [PATCH 3/7] throttle: Add throttle group infrastructure tests Alberto Garcia
  0 siblings, 1 reply; 24+ messages in thread
From: Alberto Garcia @ 2015-03-30 14:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Alberto Garcia, Stefan Hajnoczi

One more try, the changes in this series are smaller compared to the
previous one, the most important fixes are related to the tests.

V5:
- Fixed and expanded the tests. There's a new one that checks that
  configuration changes affect the whole throttling group.

- Refactored the code a bit: new function schedule_next_request()

- any_timer_armed is now reset in throttle_group_config(), it was
  causing qemu-iotest 093 to fail.

- Documentation improvements

V4: https://lists.gnu.org/archive/html/qemu-devel/2015-03/msg05558.html

- All functions from the ThrottleGroup API now receive a BlockDriverState.

- The creation/destruction of ThrottleTimers is now handled internally.

- bdrv_io_limits_enable() no longer accepts NULL as a valid group name.

- No member of a group can access someone else's throttled_reqs queues
  anymore.

- No member of a group can access someone else's timers unless they
  have queued requests.

- After a timer is fired make sure that there was actually a request
  in the queue, and schedule a new one otherwise.

- Protect bdrv_swap() by locking the throttling group.

- throttle_group_co_io_limits_intercept() is now marked as a coroutine
  function.

- Documentation updates.

Regards,

Berto

Alberto Garcia (6):
  throttle: Add throttle group infrastructure
  throttle: Add throttle group infrastructure tests
  throttle: Add throttle group support
  throttle: acquire the ThrottleGroup lock in bdrv_swap()
  throttle: add the name of the ThrottleGroup to BlockDeviceInfo
  throttle: Update throttle infrastructure copyright

Benoît Canet (1):
  throttle: Extract timers from ThrottleState into a separate structure

 block.c                         | 101 ++++-----
 block/Makefile.objs             |   1 +
 block/qapi.c                    |   8 +-
 block/throttle-groups.c         | 489 ++++++++++++++++++++++++++++++++++++++++
 blockdev.c                      |  22 +-
 hmp.c                           |  10 +-
 include/block/block.h           |   3 +-
 include/block/block_int.h       |   7 +-
 include/block/throttle-groups.h |  46 ++++
 include/qemu/throttle.h         |  46 ++--
 qapi/block-core.json            |   8 +-
 qemu-options.hx                 |   1 +
 qmp-commands.hx                 |   3 +-
 tests/test-throttle.c           | 152 +++++++++----
 util/throttle.c                 |  81 ++++---
 15 files changed, 822 insertions(+), 156 deletions(-)
 create mode 100644 block/throttle-groups.c
 create mode 100644 include/block/throttle-groups.h

-- 
2.1.4

^ permalink raw reply	[flat|nested] 24+ messages in thread
* [Qemu-devel] [PATCH v4 0/7] Block Throttle Group Support
@ 2015-03-26 17:24 Alberto Garcia
  2015-03-26 17:24 ` [Qemu-devel] [PATCH 3/7] throttle: Add throttle group infrastructure tests Alberto Garcia
  0 siblings, 1 reply; 24+ messages in thread
From: Alberto Garcia @ 2015-03-26 17:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Alberto Garcia, Stefan Hajnoczi

A new version of the patchset.

Here was the previous one:

   https://lists.gnu.org/archive/html/qemu-devel/2015-03/msg01990.html

I checked all the things pointed out by Stefan in his comments and I
think all of them are fixed now.

In addition to that I detected and fixed some additional problems.

Here's the detailed list of changes:

- All functions from the ThrottleGroup API now receive a BlockDriverState.
  This simplifies the API a bit more and makes it more consistent.

- The creation/destruction of ThrottleTimers is now handled internally
  when a BlockDriverState is added/removed from a group, since there's
  not much point on keeping them separate. This also hides the timer
  callbacks from the outside, which makes things a bit nicer and
  easier for some of the other changes included in these series.

- bdrv_io_limits_enable() no longer accepts NULL as a valid group name.

- No member of a group can access someone else's throttled_reqs queues
  anymore since there's no safe way to do it. A new (protected) field
  in BDS called pending_reqs serves that purpose now.

- No member of a group can access someone else's timers unless they
  have queued requests. A new field in ThrottleGroup called
  any_timer_armed serves that purpose. This allows changing a BDS's
  AioContext without having to remove it from the group. Otherwise
  it's not safe to call bdrv_set_aio_context().

- After a timer is fired make sure that there was actually a request
  in the queue, and schedule a new one otherwise. This is an unlikely
  corner case that I detected while preparing these series.

- New throttle_group_lock/unlock functions. These are only needed for
  the case of bdrv_swap(), which is not easy to rewrite in a way that
  does not crash without locking the group.

- throttle_group_co_io_limits_intercept() is now marked as a coroutine
  function.

- Documentation updates.

Regards,

Berto

Alberto Garcia (6):
  throttle: Add throttle group infrastructure
  throttle: Add throttle group infrastructure tests
  throttle: Add throttle group support
  throttle: acquire the ThrottleGroup lock in bdrv_swap()
  throttle: add the name of the ThrottleGroup to BlockDeviceInfo
  throttle: Update throttle infrastructure copyright

Benoît Canet (1):
  throttle: Extract timers from ThrottleState into a separate structure

 block.c                         | 101 ++++-----
 block/Makefile.objs             |   1 +
 block/qapi.c                    |   8 +-
 block/throttle-groups.c         | 478 ++++++++++++++++++++++++++++++++++++++++
 blockdev.c                      |  22 +-
 hmp.c                           |  10 +-
 include/block/block.h           |   3 +-
 include/block/block_int.h       |   7 +-
 include/block/throttle-groups.h |  46 ++++
 include/qemu/throttle.h         |  46 ++--
 qapi/block-core.json            |   8 +-
 qemu-options.hx                 |   1 +
 qmp-commands.hx                 |   3 +-
 tests/test-throttle.c           | 119 ++++++----
 util/throttle.c                 |  81 ++++---
 15 files changed, 778 insertions(+), 156 deletions(-)
 create mode 100644 block/throttle-groups.c
 create mode 100644 include/block/throttle-groups.h

-- 
2.1.4

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

end of thread, other threads:[~2015-04-10  9:55 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-30 16:19 [Qemu-devel] [PATCH v6 0/7] Block Throttle Group Support Alberto Garcia
2015-03-30 16:19 ` [Qemu-devel] [PATCH 1/7] throttle: Extract timers from ThrottleState into a separate structure Alberto Garcia
2015-03-30 16:19 ` [Qemu-devel] [PATCH 2/7] throttle: Add throttle group infrastructure Alberto Garcia
2015-04-09 12:28   ` Stefan Hajnoczi
2015-03-30 16:19 ` [Qemu-devel] [PATCH 3/7] throttle: Add throttle group infrastructure tests Alberto Garcia
2015-04-01 10:00   ` Fam Zheng
2015-04-09 12:30   ` Stefan Hajnoczi
2015-03-30 16:19 ` [Qemu-devel] [PATCH 4/7] throttle: Add throttle group support Alberto Garcia
2015-04-01 14:44   ` Fam Zheng
2015-04-01 15:18     ` Alberto Garcia
2015-04-02  3:26       ` Fam Zheng
2015-04-02  7:36         ` Alberto Garcia
2015-04-09 14:22   ` Stefan Hajnoczi
2015-04-10  7:58     ` Alberto Garcia
2015-04-10  9:52       ` Stefan Hajnoczi
2015-04-10  9:55         ` Alberto Garcia
2015-03-30 16:19 ` [Qemu-devel] [PATCH 5/7] throttle: acquire the ThrottleGroup lock in bdrv_swap() Alberto Garcia
2015-03-30 16:19 ` [Qemu-devel] [PATCH 6/7] throttle: add the name of the ThrottleGroup to BlockDeviceInfo Alberto Garcia
2015-04-01  9:59   ` Fam Zheng
2015-04-01 10:06     ` Alberto Garcia
2015-04-01 14:05       ` Fam Zheng
2015-03-30 16:19 ` [Qemu-devel] [PATCH 7/7] throttle: Update throttle infrastructure copyright Alberto Garcia
  -- strict thread matches above, loose matches on Subject: below --
2015-03-30 14:16 [Qemu-devel] [PATCH v5 0/7] Block Throttle Group Support Alberto Garcia
2015-03-30 14:16 ` [Qemu-devel] [PATCH 3/7] throttle: Add throttle group infrastructure tests Alberto Garcia
2015-03-26 17:24 [Qemu-devel] [PATCH v4 0/7] Block Throttle Group Support Alberto Garcia
2015-03-26 17:24 ` [Qemu-devel] [PATCH 3/7] throttle: Add throttle group infrastructure tests Alberto Garcia

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.