Re: [PATCH V2] Consider inflight IO in io accounting for high latency devices

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

 



On 10/13/23 12:55, Gulam Mohamed wrote:
@@ -1015,7 +1018,13 @@ static inline void blk_account_io_start(struct request *req)
  			req->part = req->q->disk->part0;
part_stat_lock();
-		update_io_ticks(req->part, jiffies, false);
+
+		if (req->q->nr_hw_queues == 1) {
+			hctx = xa_load(&req->q->hctx_table, 0);
+			inflight = blk_mq_hctx_has_tags(hctx);
+		}
+
+		update_io_ticks(req->part, jiffies, inflight);
  		part_stat_unlock();
  	}
  }

blk_account_io_start() is called by blk_mq_bio_to_request(). So if I/O
statistics are enabled and if there is only a single hardware queue,
blk_mq_hctx_has_tags() will be called every time a bio is submitted?
The blk_mq_hctx_has_tags() function iterates over all tags. I would be
surprised if anyone would consider the overhead of this approach
acceptable.

Thanks,

Bart.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux