public inbox for [email protected]
 help / color / mirror / Atom feed
From: Keith Busch <[email protected]>
To: Keith Busch <[email protected]>
Cc: [email protected], [email protected],
	[email protected], [email protected]
Subject: Re: [PATCH] io_uring: set plug tags for same file
Date: Tue, 30 May 2023 14:45:54 -0600	[thread overview]
Message-ID: <ZHZggvjNnhl/69s/@kbusch-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <[email protected]>

On Thu, May 04, 2023 at 09:24:27AM -0700, Keith Busch wrote:
> From: Keith Busch <[email protected]>
> 
> io_uring tries to optimize allocating tags by hinting to the plug how
> many it expects to need for a batch instead of allocating each tag
> individually. But io_uring submission queueus may have a mix of many
> devices for io, so the number of io's counted may be overestimated. This
> can lead to allocating too many tags, which adds overhead to finding
> that many contiguous tags, freeing up the ones we didn't use, and may
> starve out other users that can actually use them.

When running batched IO to multiple nvme drives, like with t/io_uring,
this shows a tiny improvement in CPU utilization from avoiding the
unlikely clean up condition in __blk_flush_plug() shown below:

        if (unlikely(!rq_list_empty(plug->cached_rq)))
                blk_mq_free_plug_rqs(plug);

  reply	other threads:[~2023-05-30 20:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-04 16:24 [PATCH] io_uring: set plug tags for same file Keith Busch
2023-05-30 20:45 ` Keith Busch [this message]
2023-05-31 15:44   ` Jens Axboe

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=ZHZggvjNnhl/69s/@kbusch-mbp.dhcp.thefacebook.com \
    [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