linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET] Re-introduce iov/bio no page referencing
@ 2019-02-27 20:20 Jens Axboe
  2019-02-27 20:20 ` [PATCH 1/2] iov_iter: add ITER_BVEC_FLAG_NO_REF flag Jens Axboe
  2019-02-27 20:20 ` [PATCH 2/2] block: add BIO_NO_PAGE_REF flag Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Jens Axboe @ 2019-02-27 20:20 UTC (permalink / raw)
  To: linux-fsdevel, linux-block; +Cc: hch, viro

The io_uring branch had a patch that enabled us to NOT get/put page
references on pages that we have registered from the application.
This patch assumed that it was safe to never do this for any ITER_BVEC,
but that turned out to be problematic for the splice direct case where
we stuff those pages into a pipe and unconditionally release them when
the pipe buffer is released.

This was fixed by always grabbing an extra page reference before doing
IO, and let the caller release that reference. However, this causes a
performance regressions since we're now doing an atomic inc/dec per
IO needlessly.

Instead of assuming that any ITER_BVEC caller knows not to put these
page references, have the caller explicitly flag it. This shifts the
iter types up a bit, so we can add a bit similar to the read/write bit
for managing this information.

Patch 2 then re-introduces the BIO_NO_PAGE_REF, which is now limited by
both ITER_BVEC _and_ the caller flagged it as safe.

Patches are on top of my io_uring branch.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-27 20:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-27 20:20 [PATCHSET] Re-introduce iov/bio no page referencing Jens Axboe
2019-02-27 20:20 ` [PATCH 1/2] iov_iter: add ITER_BVEC_FLAG_NO_REF flag Jens Axboe
2019-02-27 20:20 ` [PATCH 2/2] block: add BIO_NO_PAGE_REF flag Jens Axboe

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).