Linux block layer
 help / color / mirror / Atom feed
* Subsystem responsible for /proc/diskstats timings?
@ 2018-09-09  8:03 Klaus Kusche
  2018-09-13  1:26 ` Omar Sandoval
  0 siblings, 1 reply; 2+ messages in thread
From: Klaus Kusche @ 2018-09-09  8:03 UTC (permalink / raw)
  To: linux-block, linux-ide, linux-scsi


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!

-- 
Prof. Dr. Klaus Kusche
Private address: Rosenberg 41, 07546 Gera, Germany
+49 365 20413058 klaus.kusche@computerix.info https://www.computerix.info
Office address: DHGE Gera, Weg der Freundschaft 4, 07546 Gera, Germany
+49 365 4341 306 klaus.kusche@dhge.de https://www.dhge.de

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

* Re: Subsystem responsible for /proc/diskstats timings?
  2018-09-09  8:03 Subsystem responsible for /proc/diskstats timings? Klaus Kusche
@ 2018-09-13  1:26 ` Omar Sandoval
  0 siblings, 0 replies; 2+ messages in thread
From: Omar Sandoval @ 2018-09-13  1:26 UTC (permalink / raw)
  To: Klaus Kusche; +Cc: linux-block, linux-ide, linux-scsi

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;
 

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

end of thread, other threads:[~2018-09-13  6:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-09  8:03 Subsystem responsible for /proc/diskstats timings? Klaus Kusche
2018-09-13  1:26 ` Omar Sandoval

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox