From: "Michael Kerrisk (man-pages)" <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Mark Hills <mark-tknEL9DgK0w@public.gmane.org>
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] Refactoring the description of nonblocking splice behaviour
Date: Thu, 06 Aug 2015 13:06:17 +0200 [thread overview]
Message-ID: <55C33FA9.1030304@gmail.com> (raw)
In-Reply-To: <1505261556150.21456-dXq1Mi7BeBhiN/cooMRhFw@public.gmane.org>
Hello Mark,
Sorry for the delay in following up. Thanks for the proposal.
Could you take a look at the comments below and revise your patch?
On 05/26/2015 04:58 PM, Mark Hills wrote:
> Rather than the detail of SPLICE_F_NONBLOCK getting long, move this
> to its own section where it can grow to include the information with
> greater clarity.
>
> Added a description of the behaviour against a blocking file
> descriptor, including an important gotcha.
>
> I have aimed to keep to the section headings specified in man-pages(7).
>
> The description that "splice() may nevertheless block because the file
> descriptors that are spliced to/from may block" remains although I did
> not observe or investigate this behaviour myself.
I think the changelog entry could be clearer. It seems to me that the
second paragraph is the key point, and it should come at the top. Also,
that paragraph could note what the gotcha actually is (see also my comment
below). And, then, surely this patch is more than a refactoring, so I'd
title the patch differently... not sure what's best here though; do you
have a suggestion?
> ---
> man2/splice.2 | 47 ++++++++++++++++++++++++++++++++++++++++-------
> 1 files changed, 40 insertions(+), 7 deletions(-)
>
> diff --git a/man2/splice.2 b/man2/splice.2
> index 035aac4..cf1e2f6 100644
> --- a/man2/splice.2
> +++ b/man2/splice.2
> @@ -105,13 +105,11 @@ call);
> in the future, a correct implementation may be restored.
> .TP
> .B SPLICE_F_NONBLOCK
> -Do not block on I/O.
> -This makes the splice pipe operations nonblocking, but
> -.BR splice ()
> -may nevertheless block because the file descriptors that
> -are spliced to/from may block (unless they have the
> -.B O_NONBLOCK
> -flag set).
> +Make the splice operation itself nonblocking. See the
New sentences should start on new lines please.
> +.B NOTES
> +on
> +.B Nonblocking behaviours
man-pages uses American spelling consistently. s/iours/iors/
(and below also)
> +below.
> .TP
> .B SPLICE_F_MORE
> More data will be coming in a subsequent splice.
> @@ -184,6 +182,41 @@ library support was added to glibc in version 2.5.
> .SH CONFORMING TO
> This system call is Linux-specific.
> .SH NOTES
> +.SS Nonblocking behaviours
> +Whether
> +.BR splice ()
> +may block is influenced by the
> +.B O_NONBLOCK
> +flag on
> +.I fd_in
> +and
> +.IR fd_out ,
> +and the
> +.B SPLICE_F_NONBLOCK
> +flag.
> +
> +Without
> +.B SPLICE_F_NONBLOCK
> +the behaviour of the underlying
> +file descriptors defines when the
> +.BR splice()
> +operation will block.
> +
> +If
> +.B SPLICE_F_NONBLOCK
> +is set then the movement of data within
> +.BR splice()
> +is unblocking.
s/unblocking/nonblocking/
> +However,
> +.BR splice()
> +may nevertheless block because the file descriptors that
> +are spliced to/from may block.
> +Care should be taken with this flag as
> +.BR splice()
> +will not block if data from a blocking file descriptor is not resident
> +in memory; there can be a difference in behaviour where file
> +content is or is not already cached to RAM.
I'm not disputing your assertion here, but how did you verify this
last point? It would be good to include that information in the commit
message.
> +.SS Related calls
> The three system calls
> .BR splice (),
> .BR vmsplice (2),
Cheers,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-08-06 11:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-26 14:58 [PATCH] Refactoring the description of nonblocking splice behaviour Mark Hills
[not found] ` <1505261556150.21456-dXq1Mi7BeBhiN/cooMRhFw@public.gmane.org>
2015-08-06 11:06 ` Michael Kerrisk (man-pages) [this message]
[not found] ` <55C33FA9.1030304-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-11 11:03 ` Michael Kerrisk (man-pages)
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=55C33FA9.1030304@gmail.com \
--to=mtk.manpages-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark-tknEL9DgK0w@public.gmane.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).