Re-introduce iov/bio no page referencing
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 0 repliesNew
- v12 patches 0 repliesSuperseded
Changes in v2 from the cover letter
- Add comment on the bit usages of iter->type
- Move ITER_BVEC_FLAG_NO_REF at the start of the enum
- Remove superfluous 'const' in iov_iter_bvec_no_ref()
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | iov_iter: add ITER_BVEC_FLAG_NO_REF flagfs/ include/ | +22 | 0 replies | |
| 2/2 | block: add BIO_NO_PAGE_REF flagblock/ fs/ fs/ +1 more | +39 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCHSET v2 0/2] Re-introduce iov/bio no page referencing
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.
Since v1:
- Add comment on the bit usages of iter->type
- Move ITER_BVEC_FLAG_NO_REF at the start of the enum
- Remove superfluous 'const' in iov_iter_bvec_no_ref()
Signature · 1 line
Jens Axboe