summaryrefslogtreecommitdiff
path: root/include/linux/workqueue.h
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2026-11-11 12:08:16 +0100
committerChristian Brauner <brauner@kernel.org>2026-11-11 12:08:16 +0100
commit256fc12b1c95dae30109697efdc9d5bacf1a0aa5 (patch)
treed3f8536a8787e07ec92f30e9084ad0b4cfdcb844 /include/linux/workqueue.h
parentebf5025b0d989f95542fc9da899b7de2fec499f2 (diff)
parentf0c29a42bf3609336349f632c23bebd01532e8c0 (diff)
Merge patch series "splice: remove pipe buffer stealing"
Kiryl Shutsemau (Meta) <kas@kernel.org> says: ->try_steal() lets the consumer of a pipe buffer take its page instead of copying the data. Two consumers use it: - fuse, when a server splices a read reply into /dev/fuse with SPLICE_F_MOVE: the page goes into the fuse file's page cache; - virtio_console, which passes the page to the host. The page can come from the page cache of another file, from a write() into the pipe, or from vmsplice(SPLICE_F_GIFT). Stealing it takes page cache folios out of their files, and turns pages into page cache folios and back. That gets in the way of reading the page cache without folio references [1] and of telling folios apart with a PG_folio flag. It works only on pages that nothing else holds, for fuse only on clean, unmapped, order-0 ones, and it has needed fixes again and again: 32f98877c57b ("fuse: don't check refcount after stealing page") b89ecd60d38e ("fuse: ignore PG_workingset after stealing") 712a951025c0 ("fuse: fix page stealing") 59ba47b6be9c ("fuse: Check for large folio with SPLICE_F_MOVE") 15c20483d915 ("fuse: validate folio state before pipe_buf_try_steal() in fuse_try_move_folio()") Linus and David suggested removing it [2]. Both consumers already copy when a steal fails; with this series they always do. vmsplice() and splice() still accept SPLICE_F_GIFT and SPLICE_F_MOVE, and fuse still advertises FUSE_SPLICE_MOVE, so that servers which ask for it mount as before. Without ->try_steal(), nosteal_pipe_buf_ops is the same as default_pipe_buf_ops, and the last patch keeps only the latter. Tested on x86_64 with a FUSE server that answers reads by splicing the page cache pages of a backing file into /dev/fuse with SPLICE_F_MOVE. On v7.4-rc1 how much moves depends on folio sizes: with order-0 folios on both sides, one read of a 16M fuse file took 3968 of the backing file's 4096 pages out of its page cache. With the series nothing moves, and the data read through fuse is the same, also when the server reads its requests with splice(). A virtio-serial port fed by splice() from a pipe and from a file, and vmsplice(SPLICE_F_GIFT), SPLICE_F_MOVE, tee() and AF_UNIX socket splice checks also give the same data before and after. [1] https://lore.kernel.org/all/20261104130118.2507513-1-kas@kernel.org/ [2] https://lore.kernel.org/all/CAHk-=whhp=Q8qR+wPoM9+mxYPQ_OXMOEoKmT7J0JZikFZusuqw@mail.gmail.com/ * patches from https://patch.msgid.link/20261110145241.536019-1-kas@kernel.org: splice: replace nosteal_pipe_buf_ops with default_pipe_buf_ops splice: remove pipe buffer stealing fuse: don't move pipe buffers into the page cache virtio_console: copy pipe buffers in splice_write() Link: https://patch.msgid.link/20261110145241.536019-1-kas@kernel.org Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'include/linux/workqueue.h')
0 files changed, 0 insertions, 0 deletions