linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: linux-block@vger.kernel.org
Cc: joshi.k@samsung.com, kbusch@kernel.org
Subject: [PATCHSET 0/3] passthru block optimizations
Date: Sat,  6 Aug 2022 09:20:01 -0600	[thread overview]
Message-ID: <20220806152004.382170-1-axboe@kernel.dk> (raw)

Hi,

Currently passthru IO is slower than bdev O_DIRECT. One of the reasons
is that we do two allocations for each IO:

- One alloc+free for the page array for mapping the data
- One alloc+free of the bio

Let passthru IO dip into the bio cache to eliminate that one, and use
UIO_FASTIOV to gate whether we need to alloc+free the page array for
mapping purposes.

This closes about half of the gap between passthru and bdev dio for me.
If we can sanely wire up completion batching for passthru, then that
would almost fully close the gap. Outside of that, the main missing
feature for passthru is the ability to use registered buffers with
io_uring, as the per-io get_user_pages() is a large cycle consumer as
well.

-- 
Jens Axboe



             reply	other threads:[~2022-08-06 15:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-06 15:20 Jens Axboe [this message]
2022-08-06 15:20 ` [PATCH 1/3] block: shrink rq_map_data a bit Jens Axboe
2022-08-07  9:26   ` Chaitanya Kulkarni
2022-08-06 15:20 ` [PATCH 2/3] block: enable bio caching use for passthru IO Jens Axboe
2022-08-07  9:27   ` Chaitanya Kulkarni
2022-08-07 18:08   ` Kanchan Joshi
2022-08-07 18:45     ` Jens Axboe
2022-08-06 15:20 ` [PATCH 3/3] block: use on-stack page vec for <= UIO_FASTIOV Jens Axboe
2022-08-07  9:30   ` Chaitanya Kulkarni

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=20220806152004.382170-1-axboe@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=joshi.k@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=linux-block@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;
as well as URLs for NNTP newsgroup(s).