From: Bart Van Assche <bvanassche@acm.org>
To: Gulam Mohamed <gulam.mohamed@oracle.com>,
axboe@kernel.dk, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2] Consider inflight IO in io accounting for high latency devices
Date: Fri, 13 Oct 2023 14:13:08 -0700 [thread overview]
Message-ID: <35e3e173-8018-42d8-a6e8-7ba994ff6b17@acm.org> (raw)
In-Reply-To: <20231013195559.1306345-1-gulam.mohamed@oracle.com>
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.
next prev parent reply other threads:[~2023-10-13 21:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-13 19:55 Gulam Mohamed
2023-10-13 21:13 ` Bart Van Assche [this message]
2023-10-16 20:01 ` Gulam Mohamed
2023-10-16 21:16 ` Bart Van Assche
2023-10-17 4:13 ` Gulam Mohamed
2023-10-17 14:23 ` Jens Axboe
2023-10-18 18:44 ` Gulam Mohamed
2023-10-18 18:56 ` Jens Axboe
2023-10-19 16:44 ` Gulam Mohamed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=35e3e173-8018-42d8-a6e8-7ba994ff6b17@acm.org \
--to=bvanassche@acm.org \
--cc=axboe@kernel.dk \
--cc=gulam.mohamed@oracle.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®