On 11/23/23 8:30 AM, Christoph Hellwig wrote: > On Thu, Nov 23, 2023 at 03:54:31PM +0530, kundan.kumar wrote: >> - if (test_bit(QUEUE_FLAG_STATS, &q->queue_flags)) { >> + if (test_bit(QUEUE_FLAG_STATS, &q->queue_flags) >> + && !blk_rq_is_passthrough(rq)) { > > && goes on the starting line in the kernel code style. > > The rest looks good, but that stats overhead seems pretty horrible.. It is, but at least it's better than what it used to be. Here's an example from my box, you can pretty easily tell when iostats got enabled while it was running: [...] submitter=22, tid=645761, file=/dev/nvme22n1, node=6 submitter=23, tid=645762, file=/dev/nvme23n1, node=6 polled=1, fixedbufs=1/0, register_files=1, buffered=0, QD=128 Engine=io_uring, sq_ring=128, cq_ring=128 IOPS=119.09M, BW=58.15GiB/s, IOS/call=31/31 IOPS=122.03M, BW=59.59GiB/s, IOS/call=31/31 IOPS=122.01M, BW=59.58GiB/s, IOS/call=31/32 IOPS=122.02M, BW=59.58GiB/s, IOS/call=31/32 IOPS=122.02M, BW=59.58GiB/s, IOS/call=31/31 IOPS=112.72M, BW=55.04GiB/s, IOS/call=31/31 IOPS=108.43M, BW=52.94GiB/s, IOS/call=31/32 IOPS=108.46M, BW=52.96GiB/s, IOS/call=32/31 IOPS=108.58M, BW=53.02GiB/s, IOS/call=31/31 -- Jens Axboe