mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
Following the same idea, it occurs to me that we should only update
disk stat when "now" is different from disk->stamp. Otherwise, we are again needlessly adding zero to the stats. Signed-off-by: Ken Chen <kenneth.w.chen@intel.com> Signed-off-by: Jens Axboe <axboe@suse.de>
This commit is contained in:
parent
20e5c81fcf
commit
b2982649ce
@ -2433,6 +2433,9 @@ void disk_round_stats(struct gendisk *disk)
|
||||
{
|
||||
unsigned long now = jiffies;
|
||||
|
||||
if (now == disk->stamp)
|
||||
return;
|
||||
|
||||
if (disk->in_flight) {
|
||||
__disk_stat_add(disk, time_in_queue,
|
||||
disk->in_flight * (now - disk->stamp));
|
||||
|
Loading…
Reference in New Issue
Block a user