io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* SQE OP - sendfile
@ 2020-04-29 15:21 Mark Papadakis
  2020-04-29 15:39 ` Pavel Begunkov
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Papadakis @ 2020-04-29 15:21 UTC (permalink / raw)
  To: io-uring

Greetings,

Are there any plans for an SENDFILE SQE OP?
Using a pipe and 2 two SPLICE ops(using the LINK flag) for moving data from one file FD to a socket FD(for example) works - but it’s somewhat inconvenient and maybe more expensive than it would otherwise be if there was a dedicated op for a sendfile() like facility.

Thank you,
@markpapadakis


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: SQE OP - sendfile
  2020-04-29 15:21 SQE OP - sendfile Mark Papadakis
@ 2020-04-29 15:39 ` Pavel Begunkov
  0 siblings, 0 replies; 2+ messages in thread
From: Pavel Begunkov @ 2020-04-29 15:39 UTC (permalink / raw)
  To: Mark Papadakis, io-uring

On 29/04/2020 18:21, Mark Papadakis wrote:
> Greetings,
> 
> Are there any plans for an SENDFILE SQE OP?
> Using a pipe and 2 two SPLICE ops(using the LINK flag) for moving data from one file FD to a socket FD(for example) works - but it’s somewhat inconvenient and maybe more expensive than it would otherwise be if there was a dedicated op for a sendfile() like facility.
> 

I didn't dig deeply, but it's done by internally creating a pipe and leaving it
with a task up until it exits. I hope such pipes use only 1 page or so, but I
don't like the idea of having one per each io-wq thread (even lazily as it's
done now).

If we really want to do that, would probably need something more elaborate.
Jens may shed some light.

-- 
Pavel Begunkov

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-29 15:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29 15:21 SQE OP - sendfile Mark Papadakis
2020-04-29 15:39 ` Pavel Begunkov

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).