Skip to contentSkip to conversation

vmsplice.2: SPLICE_F_GIFT became no-op

PATCH Michael Kerrisk (man-pages) 3 participants 5 messages Sep 13, 2019 – Dec 18, 2019 1 message not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hello Jens,

Would you be willing to take a look at this man-pages bug report relating to vmsplice()?

Thanks,

Michael

Quoted 33 lines · Leonardo Bras

As explained in splice.2, SPLICE_F_MOVE became a no-op, and since it is needed to use page gifting, it made SPLICE_F_GIFT a no-op too.

I took a look in current code, and found no use of this flag:
When enabled, it sets PIPE_BUF_FLAG_GIFT,which is only checked in user_page_pipe_buf_steal, which is only used on user_page_pipe_buf_ops, as a .steal component.

But, in the whole kernel code, there is no calling of a steal() function, making me believe this flag is not used anymore.

---
 man2/vmsplice.2 | 5 +++++
 1 file changed, 5 insertions(+)
man2/vmsplice.2 +5 -0
index 17834607b..94fb86142 100644
@@ -123,6 +123,11 @@ if this flag is not specified, then a subsequent
 .B SPLICE_F_MOVE
 must copy the pages.
 Data must also be properly page aligned, both in memory and length.
+Starting in Linux 2.6.21, it is a no-op, because the
+.B SPLICE_F_MOVE
+also became a no-op on
+.BR splice (2)
+.
 .\" FIXME
 .\" It looks like the page-alignment requirement went away with
 .\" commit bd1a68b59c8e3bce45fb76632c64e1e063c3962d
Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
#2 lore raw
Quoted 8 lines · Michael Kerrisk (man-pages)

Hello Jens,

Would you be willing to take a look at this man-pages bug report relating to vmsplice()?

Thanks,

Michael

Hello Michael, Jens,
Any update about this patch?

Kind Regards,

Quoted 40 lines · Leonardo Bras
Quoted 36 lines

As explained in splice.2, SPLICE_F_MOVE became a no-op, and since it
is needed to use page gifting, it made SPLICE_F_GIFT a no-op too.

I took a look in current code, and found no use of this flag:
When enabled, it sets PIPE_BUF_FLAG_GIFT,which is only checked in user_page_pipe_buf_steal, which is only used on user_page_pipe_buf_ops, as a .steal component.

But, in the whole kernel code, there is no calling of a steal() function, making me believe this flag is not used anymore.

---
 man2/vmsplice.2 | 5 +++++
 1 file changed, 5 insertions(+)
man2/vmsplice.2 +0 -0
index 17834607b..94fb86142 100644
@@ -123,6 +123,11 @@ if this flag is not specified, then a

subsequent
.B SPLICE_F_MOVE
must copy the pages.
Data must also be properly page aligned, both in memory and
length.

man2/vmsplice.2 +5 -0
+Starting in Linux 2.6.21, it is a no-op, because the
+.B SPLICE_F_MOVE
+also became a no-op on
+.BR splice (2)
+.
 .\" FIXME
 .\" It looks like the page-alignment requirement went away with
 .\" commit bd1a68b59c8e3bce45fb76632c64e1e063c3962d
#3 lore raw
In reply to Michael Kerrisk (man-pages)
Quoted 4 lines · Michael Kerrisk (man-pages)

Hello Jens,

Would you be willing to take a look at this man-pages bug report relating to vmsplice()?

Hello Jens,

Could you please provide feedback on this patch?

Thank you,
Leonardo Bras

Quoted 41 lines

Thanks,

Michael

Quoted 33 lines · Leonardo Bras

As explained in splice.2, SPLICE_F_MOVE became a no-op, and since it is needed to use page gifting, it made SPLICE_F_GIFT a no-op too.

I took a look in current code, and found no use of this flag:
When enabled, it sets PIPE_BUF_FLAG_GIFT,which is only checked in user_page_pipe_buf_steal, which is only used on user_page_pipe_buf_ops, as a .steal component.

But, in the whole kernel code, there is no calling of a steal() function, making me believe this flag is not used anymore.

---
 man2/vmsplice.2 | 5 +++++
 1 file changed, 5 insertions(+)
man2/vmsplice.2 +5 -0
index 17834607b..94fb86142 100644
@@ -123,6 +123,11 @@ if this flag is not specified, then a subsequent
 .B SPLICE_F_MOVE
 must copy the pages.
 Data must also be properly page aligned, both in memory and length.
+Starting in Linux 2.6.21, it is a no-op, because the
+.B SPLICE_F_MOVE
+also became a no-op on
+.BR splice (2)
+.
 .\" FIXME
 .\" It looks like the page-alignment requirement went away with
 .\" commit bd1a68b59c8e3bce45fb76632c64e1e063c3962d
#4 lore raw

Sorry, better late than never?

He's right, Nick Piggin removed that flag (and promised to reinstate it, but a decade later I'm not holding my breath).

Quoted 55 lines · Leonardo Bras
Quoted 4 lines · Michael Kerrisk (man-pages)

Hello Jens,

Would you be willing to take a look at this man-pages bug report relating to vmsplice()?

Hello Jens,

Could you please provide feedback on this patch?

Thank you,
Leonardo Bras

Quoted 41 lines

Thanks,

Michael

Quoted 33 lines · Leonardo Bras

As explained in splice.2, SPLICE_F_MOVE became a no-op, and since it is needed to use page gifting, it made SPLICE_F_GIFT a no-op too.

I took a look in current code, and found no use of this flag:
When enabled, it sets PIPE_BUF_FLAG_GIFT,which is only checked in user_page_pipe_buf_steal, which is only used on user_page_pipe_buf_ops, as a .steal component.

But, in the whole kernel code, there is no calling of a steal() function, making me believe this flag is not used anymore.

---
 man2/vmsplice.2 | 5 +++++
 1 file changed, 5 insertions(+)
man2/vmsplice.2 +5 -0
index 17834607b..94fb86142 100644
@@ -123,6 +123,11 @@ if this flag is not specified, then a subsequent
 .B SPLICE_F_MOVE
 must copy the pages.
 Data must also be properly page aligned, both in memory and length.
+Starting in Linux 2.6.21, it is a no-op, because the
+.B SPLICE_F_MOVE
+also became a no-op on
+.BR splice (2)
+.
 .\" FIXME
 .\" It looks like the page-alignment requirement went away with
 .\" commit bd1a68b59c8e3bce45fb76632c64e1e063c3962d
Signature · 1 line
Jens Axboe
#5 lore raw
Quoted 1 line · Jens Axboe

Sorry, better late than never?

No problem :)

Quoted 2 lines

He's right, Nick Piggin removed that flag (and promised to reinstate it, but a decade later I'm not holding my breath).

Thanks for the feedback!

Best regards,
Leonardo Bras