blk-throttle: minor cleanups
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | blk-throttle: avoid ilog2(0) in calculate_bytes_allowed()block/ | +4 | 1 reply | |
| 2/2 | blk-throttle: factor out limit field printing in tg_prfill_limit()block/ | +19 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] blk-throttle: minor cleanups
From: Tao Cui <[email protected]>
This short series collects two independent, behavior-preserving cleanups to the blk-throttle policy.
Patch 1 reworks calculate_bytes_allowed() to short-circuit a zero jiffy_elapsed explicitly, rather than relying on ilog2(0) == -1 (fls64(0) - 1) to skip the overflow guard. __tg_update_carryover() reaches it with a zero elapsed time right after a slice starts.
Patch 2 factors the four identical rbps/wbps/riops/wiops print blocks in tg_prfill_limit() into a small helper and drops two alias locals.
Neither changes behavior; the io.max seq_file output is unchanged. Built and boot-tested in QEMU (cgroup v2 io.max read-back matches, throttled IO completes without warning/oops).
Tao Cui (2):
blk-throttle: avoid ilog2(0) in calculate_bytes_allowed()
blk-throttle: factor out limit field printing in tg_prfill_limit()
block/blk-throttle.c | 52 ++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 29 deletions(-)
Signature · 1 line
2.43.0