qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/9] Misc fixes for throttle
@ 2023-07-28  2:19 zhenwei pi
  2023-07-28  2:19 ` [PATCH v5 1/9] throttle: introduce enum ThrottleDirection zhenwei pi
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: zhenwei pi @ 2023-07-28  2:19 UTC (permalink / raw)
  To: berto, kwolf, hreitz; +Cc: qemu_oss, qemu-devel, qemu-block, zhenwei pi

v4 -> v5:
- typo fix in 'throttle: use enum ThrottleDirection instead of bool is_write':
  '@throttle:   throttle direction' -> '@direction:   throttle direction'
- several 'for (i = 0; i < 2; i++)' left, use
  'for (dir = THROTTLE_READ; dir < THROTTLE_MAX; dir++)' instead.
  'true/false' left, use 'THROTTLE_XXX' instead.

v3 -> v4:
- Hanna pointed out that 'throttle type' is not clear enough,
  'throttle direction' would be better in the v3.
  Use 'ThrottleDirection' instead, also rename 'ThrottleType throttle' to 'ThrottleDirection direction'.

- For patch 'throttle: support read-only and write-only', reduce codes by:
for (dir = THROTTLE_READ; dir < THROTTLE_MAX; dir++) {
    ...
}

- Add commit message for the removed 'FIXME' tag.

- Append 'throttle: use THROTTLE_MAX/ARRAY_SIZE for hard code'
- Append 'fsdev: Use ThrottleDirection instread of bool is_write'
- Append 'block/throttle-groups: Use ThrottleDirection instread of bool is_write'

Finally, 'bool is_write' has been fully removed from throttle related codes,
'type foo[2]' becomes 'type foo[THROTTLE_MAX]'.

v2 -> v3:
- patch 1 -> patch 5 are already reviewed by Alberto
- append patch 6: throttle: use enum ThrottleType instead of bool is_write

v1 -> v2:
- rename 'ThrottleTimerType' to 'ThrottleType'
- add assertion to throttle_schedule_timer

v1:
- introduce enum ThrottleTimerType instead of timers[0], timer[1]...
- support read-only and write-only for throttle
- adapt related test codes
- cryptodev uses a write-only throttle timer

Zhenwei Pi (9):
  throttle: introduce enum ThrottleDirection
  test-throttle: use enum ThrottleDirection
  throttle: support read-only and write-only
  test-throttle: test read only and write only
  cryptodev: use NULL throttle timer cb for read direction
  throttle: use enum ThrottleDirection instead of bool is_write
  throttle: use THROTTLE_MAX/ARRAY_SIZE for hard code
  fsdev: Use ThrottleDirection instread of bool is_write
  block/throttle-groups: Use ThrottleDirection instread of bool is_write

 backends/cryptodev.c            |  12 +--
 block/block-backend.c           |   4 +-
 block/throttle-groups.c         | 163 ++++++++++++++++----------------
 block/throttle.c                |   8 +-
 fsdev/qemu-fsdev-throttle.c     |  18 ++--
 fsdev/qemu-fsdev-throttle.h     |   4 +-
 hw/9pfs/cofile.c                |   4 +-
 include/block/throttle-groups.h |   6 +-
 include/qemu/throttle.h         |  16 +++-
 tests/unit/test-throttle.c      |  76 ++++++++++++++-
 util/throttle.c                 |  84 +++++++++-------
 11 files changed, 246 insertions(+), 149 deletions(-)

-- 
2.34.1



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

end of thread, other threads:[~2023-08-25 13:25 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-28  2:19 [PATCH v5 0/9] Misc fixes for throttle zhenwei pi
2023-07-28  2:19 ` [PATCH v5 1/9] throttle: introduce enum ThrottleDirection zhenwei pi
2023-07-28  2:19 ` [PATCH v5 2/9] test-throttle: use " zhenwei pi
2023-07-28  2:20 ` [PATCH v5 3/9] throttle: support read-only and write-only zhenwei pi
2023-07-28  2:20 ` [PATCH v5 4/9] test-throttle: test read only and write only zhenwei pi
2023-07-28  2:20 ` [PATCH v5 5/9] cryptodev: use NULL throttle timer cb for read direction zhenwei pi
2023-07-28  2:20 ` [PATCH v5 6/9] throttle: use enum ThrottleDirection instead of bool is_write zhenwei pi
2023-07-28  2:20 ` [PATCH v5 7/9] throttle: use THROTTLE_MAX/ARRAY_SIZE for hard code zhenwei pi
2023-07-28  2:20 ` [PATCH v5 8/9] fsdev: Use ThrottleDirection instread of bool is_write zhenwei pi
2023-08-07 14:24   ` Greg Kurz
2023-07-28  2:20 ` [PATCH v5 9/9] block/throttle-groups: " zhenwei pi
2023-07-28  9:47   ` Hanna Czenczek
2023-08-25 13:25 ` [PATCH v5 0/9] Misc fixes for throttle Hanna Czenczek

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