Hello Andrei, On 11/07/2017 08:34 AM, Andrei Vagin wrote:
The man page describes that vmsplice can splice pages from memory to a pipe, but it can work to anonther direction as well.
Patch applied. Sorry for the long delay... Cheers, Michael
Cc: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Andrei Vagin <avagin@xxxxxxxxxx> --- man2/vmsplice.2 | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/man2/vmsplice.2 b/man2/vmsplice.2 index e3e61cf27..8f48b8809 100644 --- a/man2/vmsplice.2 +++ b/man2/vmsplice.2 @@ -25,7 +25,7 @@ .\" .TH VMSPLICE 2 2014-10-02 "Linux" "Linux Programmer's Manual" .SH NAME -vmsplice \- splice user pages into a pipe +vmsplice \- splice user pages to/from a pipe .SH SYNOPSIS .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" @@ -44,13 +44,25 @@ vmsplice \- splice user pages into a pipe .\" the kernel-space one (contrast this to "write()", which copies .\" the actual data, and you can thus reuse the buffer immediately .\" after a successful write), but that is often easy to do. -The +If +.I fd +is opened for writting, the .BR vmsplice () system call maps .I nr_segs ranges of user memory described by .I iov into a pipe. +.\" commit 6a14b90bb6bc7cd83e2a444bf457a2ea645cbfe7 +If +.I fd +is opened for reading, the +.BR vmsplice () +system call fills +.I nr_segs +ranges of user memory described by +.I iov +from a pipe. The file descriptor .I fd must refer to a pipe. @@ -70,7 +82,6 @@ struct iovec { }; .in .fi - The .I flags argument is a bit mask that is composed by ORing together @@ -163,6 +174,13 @@ as defined in Currently, .\" UIO_MAXIOV in kernel source this limit is 1024. + +.\" commit 6a14b90bb6bc7cd83e2a444bf457a2ea645cbfe7 +.BR vmsplice () +only really supports true splicing from user memory to a pipe. In another +direction, it actually just copies the data to userspace. But this makes +the interface nice and symmetric and enables people to build on splice, +with room for future improvement in performance. .SH SEE ALSO .BR splice (2), .BR tee (2)
-- To unsubscribe from this list: send the line "unsubscribe linux-api" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html