* Re: [PATCH 2/3] vmsplice: make vmsplice a trivial wrapper for preadv2/pwritev2
[not found] ` <20260531010107.1953702-3-safinaskar@gmail.com>
@ 2026-06-08 17:19 ` Alexander Gordeev
2026-06-08 18:42 ` David Hildenbrand (Arm)
2026-06-16 0:36 ` Askar Safin
0 siblings, 2 replies; 3+ messages in thread
From: Alexander Gordeev @ 2026-06-08 17:19 UTC (permalink / raw)
To: Askar Safin
Cc: linux-fsdevel, Christian Brauner, Alexander Viro, Jan Kara,
linux-kernel, linux-mm, linux-api, netdev, Linus Torvalds,
Matthew Wilcox, Jens Axboe, Christoph Hellwig, David Howells,
Andrew Morton, David Hildenbrand, Pedro Falcato, Miklos Szeredi,
patches, linux-s390, linux-next
On Sun, May 31, 2026 at 01:01:06AM +0000, Askar Safin wrote:
> vmsplice behavior on writable pipe became equivalent to pwritev2.
> vmsplice behavior on readable pipe already was nearly
> equivalent to preadv2, but I made this explicit. I. e. I made it
> obvious from code that vmsplice now is equivalent to preadv2/pwritev2.
>
> Also I moved vmsplice to fs/read_write.c, because now it arguably
> belongs there.
>
> Note that SPLICE_F_NONBLOCK behavior slightly changed: previously
> vmsplice ignored whether the pipe was opened with O_NONBLOCK, and mode
> of operation depended on whether SPLICE_F_NONBLOCK was passed only.
> Now the operation will be non-blocking if O_NONBLOCK was passed when
> opening *or* SPLICE_F_NONBLOCK was passed to vmsplice. Previous
> behavior was arguably buggy, and new behavior is arguably better.
>
> Now SPLICE_F_GIFT is always ignored by all 3 syscalls: splice, tee
> and vmsplice.
>
> Signed-off-by: Askar Safin <safinaskar@gmail.com>
> ---
> fs/read_write.c | 23 +++++
> fs/splice.c | 192 +--------------------------------------
> include/linux/skbuff.h | 4 +-
> include/linux/splice.h | 2 +-
> include/linux/syscalls.h | 4 +-
> 5 files changed, 29 insertions(+), 196 deletions(-)
Hi All,
This patch as commit e2c0b2368081b ("vmsplice: make vmsplice a trivial
wrapper for preadv2/pwritev2") in linux-next on s390 causes the selftest
tools/testing/selftests/mm/cow.c to hang:
# [RUN] vmsplice() + unmap in child ... with PTE-mapped THP (128 kB)
Recently there has been changes in THP area, so the problem is not
necessary linked to this patch per se.
Please, let me know if you need any additional information.
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/3] vmsplice: make vmsplice a trivial wrapper for preadv2/pwritev2
2026-06-08 17:19 ` [PATCH 2/3] vmsplice: make vmsplice a trivial wrapper for preadv2/pwritev2 Alexander Gordeev
@ 2026-06-08 18:42 ` David Hildenbrand (Arm)
2026-06-16 0:36 ` Askar Safin
1 sibling, 0 replies; 3+ messages in thread
From: David Hildenbrand (Arm) @ 2026-06-08 18:42 UTC (permalink / raw)
To: Alexander Gordeev, Askar Safin
Cc: linux-fsdevel, Christian Brauner, Alexander Viro, Jan Kara,
linux-kernel, linux-mm, linux-api, netdev, Linus Torvalds,
Matthew Wilcox, Jens Axboe, Christoph Hellwig, David Howells,
Andrew Morton, Pedro Falcato, Miklos Szeredi, patches, linux-s390,
linux-next
On 6/8/26 19:19, Alexander Gordeev wrote:
> On Sun, May 31, 2026 at 01:01:06AM +0000, Askar Safin wrote:
>> vmsplice behavior on writable pipe became equivalent to pwritev2.
>> vmsplice behavior on readable pipe already was nearly
>> equivalent to preadv2, but I made this explicit. I. e. I made it
>> obvious from code that vmsplice now is equivalent to preadv2/pwritev2.
>>
>> Also I moved vmsplice to fs/read_write.c, because now it arguably
>> belongs there.
>>
>> Note that SPLICE_F_NONBLOCK behavior slightly changed: previously
>> vmsplice ignored whether the pipe was opened with O_NONBLOCK, and mode
>> of operation depended on whether SPLICE_F_NONBLOCK was passed only.
>> Now the operation will be non-blocking if O_NONBLOCK was passed when
>> opening *or* SPLICE_F_NONBLOCK was passed to vmsplice. Previous
>> behavior was arguably buggy, and new behavior is arguably better.
>>
>> Now SPLICE_F_GIFT is always ignored by all 3 syscalls: splice, tee
>> and vmsplice.
>>
>> Signed-off-by: Askar Safin <safinaskar@gmail.com>
>> ---
>> fs/read_write.c | 23 +++++
>> fs/splice.c | 192 +--------------------------------------
>> include/linux/skbuff.h | 4 +-
>> include/linux/splice.h | 2 +-
>> include/linux/syscalls.h | 4 +-
>> 5 files changed, 29 insertions(+), 196 deletions(-)
>
> Hi All,
>
> This patch as commit e2c0b2368081b ("vmsplice: make vmsplice a trivial
> wrapper for preadv2/pwritev2") in linux-next on s390 causes the selftest
> tools/testing/selftests/mm/cow.c to hang:
>
> # [RUN] vmsplice() + unmap in child ... with PTE-mapped THP (128 kB)
>
> Recently there has been changes in THP area, so the problem is not
> necessary linked to this patch per se.
If we reach 128 kB, then 64 kB likely worked. Which might hint at a similar problem
as found by the vmsplice01 ltp test case (blocking instead of returning once the
pipe is full).
https://lore.kernel.org/r/20260603-raumfahrt-unmerklich-ertrugen-c4ecae70d5f9@brauner
--
Cheers,
David
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/3] vmsplice: make vmsplice a trivial wrapper for preadv2/pwritev2
2026-06-08 17:19 ` [PATCH 2/3] vmsplice: make vmsplice a trivial wrapper for preadv2/pwritev2 Alexander Gordeev
2026-06-08 18:42 ` David Hildenbrand (Arm)
@ 2026-06-16 0:36 ` Askar Safin
1 sibling, 0 replies; 3+ messages in thread
From: Askar Safin @ 2026-06-16 0:36 UTC (permalink / raw)
To: agordeev
Cc: akpm, axboe, brauner, david, dhowells, hch, jack, linux-api,
linux-fsdevel, linux-kernel, linux-mm, linux-next, linux-s390,
miklos, netdev, patches, pfalcato, safinaskar, torvalds, viro,
willy
Alexander Gordeev <agordeev@linux.ibm.com>:
> Hi All,
>
> This patch as commit e2c0b2368081b ("vmsplice: make vmsplice a trivial
> wrapper for preadv2/pwritev2") in linux-next on s390 causes the selftest
> tools/testing/selftests/mm/cow.c to hang:
>
> # [RUN] vmsplice() + unmap in child ... with PTE-mapped THP (128 kB)
>
> Recently there has been changes in THP area, so the problem is not
> necessary linked to this patch per se.
>
> Please, let me know if you need any additional information.
>
> Thanks!
As well as I understand, this test uses vmsplice to pin pages.
I. e. if my patch lands, then this test should be rewriten to use
some other mechanism.
--
Askar Safin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-16 0:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260531010107.1953702-1-safinaskar@gmail.com>
[not found] ` <20260531010107.1953702-3-safinaskar@gmail.com>
2026-06-08 17:19 ` [PATCH 2/3] vmsplice: make vmsplice a trivial wrapper for preadv2/pwritev2 Alexander Gordeev
2026-06-08 18:42 ` David Hildenbrand (Arm)
2026-06-16 0:36 ` Askar Safin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox