Thread (2 messages) 2 messages, 2 authors, 2018-09-13

Re: Subsystem responsible for /proc/diskstats timings?

From: Omar Sandoval <osandov@osandov.com>
Date: 2018-09-13 06:33:50
Subsystem: block layer, the rest · Maintainers: Jens Axboe, Linus Torvalds

On Sun, Sep 09, 2018 at 10:03:35AM +0200, Klaus Kusche wrote:
Hello,

Which subsystem could be responsible for

https://bugzilla.kernel.org/show_bug.cgi?id=200857

("4.18 regression: /proc/diskstats: I/O busy time not updated correctly")?

This is for AHCI SATA disks (/dev/sda, /dev/sdb, ...),
and the busy time reported by /proc/diskstats for SSD's is still (4.18.6)
to low by at least a factor of 20 (!).

Many thanks in advance for your help!
This was probably 522a777566f5 ("block: consolidate struct request
timestamp fields"). Not the proper fix, but can you try the following:
diff --git a/block/blk-core.c b/block/blk-core.c
index 4dbc93f43b38..663430090281 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -2738,7 +2738,7 @@ void blk_account_io_done(struct request *req, u64 now)
 		struct hd_struct *part;
 		int cpu;
 
-		duration = nsecs_to_jiffies(now - req->start_time_ns);
+		duration = max(nsecs_to_jiffies(now - req->start_time_ns), 1);
 		cpu = part_stat_lock();
 		part = req->part;
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help