Re: Subsystem responsible for /proc/diskstats timings?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux