提交 b2982649 编写于 作者: C Chen, Kenneth W 提交者: 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: NKen Chen <kenneth.w.chen@intel.com>
Signed-off-by: NJens Axboe <axboe@suse.de>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册