From: Jens Axboe <[email protected]>
To: Hao Xu <[email protected]>
Cc: [email protected], Pavel Begunkov <[email protected]>,
Joseph Qi <[email protected]>
Subject: Re: [PATCH] io_uring: spin in iopoll() only when reqs are in a single queue
Date: Sun, 27 Jun 2021 16:22:54 -0600 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 6/27/21 3:37 PM, Hao Xu wrote:
> We currently spin in iopoll() when requests to be iopolled are for
> same file(device), while one device may have multiple hardware queues.
> given an example:
>
> hw_queue_0 | hw_queue_1
> req(30us) req(10us)
>
> If we first spin on iopolling for the hw_queue_0. the avg latency would
> be (30us + 30us) / 2 = 30us. While if we do round robin, the avg
> latency would be (30us + 10us) / 2 = 20us since we reap the request in
> hw_queue_1 in time. So it's better to do spinning only when requests
> are in same hardware queue.
Applied, thanks.
--
Jens Axboe
prev parent reply other threads:[~2021-06-27 22:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-27 21:37 [PATCH] io_uring: spin in iopoll() only when reqs are in a single queue Hao Xu
2021-06-27 22:22 ` Jens Axboe [this message]
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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