Thread (2 messages) flat view 2 messages, 2 authors, 2021-07-21
STALE1887d

[PATCH] block/bfq: the delta_from_first should be ns rather than us

From: liubaozhu <hidden>
Date: 2021-07-21 06:32:02
Also in: lkml
Subsystem: bfq i/o scheduler, block layer, the rest · Maintainers: Yu Kuai, Jens Axboe, Linus Torvalds

In the block/bfq-iosched.c,the function bfq_update_peak_rate(),
bfqd->delta_from_first = now_ns - bfqd->first_dispatch,
according to the subtraction operation here,now_ns is ns,
and bfqd->first_dispatch is also ns,so bfqd->delta_from_first should be ns.

Signed-off-by: liubaozhu <redacted>
---
 block/bfq-iosched.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/bfq-iosched.h b/block/bfq-iosched.h
index 99c2a3cb0..7cf4fc8c3 100644
--- a/block/bfq-iosched.h
+++ b/block/bfq-iosched.h
@@ -632,7 +632,7 @@ struct bfq_data {
 	u64 tot_sectors_dispatched;
 	/* max rq size seen during current observation interval (sectors) */
 	u32 last_rq_max_size;
-	/* time elapsed from first dispatch in current observ. interval (us) */
+	/* time elapsed from first dispatch in current observ. interval (ns) */
 	u64 delta_from_first;
 	/*
 	 * Current estimate of the device peak rate, measured in
-- 
2.20.1


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help