Commit b2982649 authored by Chen, Kenneth W's avatar Chen, Kenneth W Committed by Jens Axboe

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: default avatarKen Chen <kenneth.w.chen@intel.com>
Signed-off-by: default avatarJens Axboe <axboe@suse.de>
parent 20e5c81f
......@@ -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));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment