Is IO_URING's zero copy technology only used for network communication? #1149
-
I have seen this interface (io_uring_prep_send_zc) used for zero copy, but it seems to be used for inter network transmission and reception. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Yes, it's falls back to copying when data doesn't leave the machine (e.g. localhost) and in some other cases as well like the NIC not supporting features needed.
You'd need to clarify what you mean by "data transfer between user mode and kernel mode"
With send zc there is |
Beta Was this translation helpful? Give feedback.
-
I'm very sorry for taking up your time, If it is achieved through zero copy technology, is it achieved through SQ Ring? Or is it that the data in user mode memory and the data seen by the kernel are achieved through address translation, without the need for copying data? I'm not sure if this involves zero copy technology. |
Beta Was this translation helpful? Give feedback.
"Zero copy" is a fancy word referring to many different kinds of copy optimisations. If it's about storage ("dropping onto the disk"), then open the file with
O_DIRECT
and it should already be "zero copy" if the file/filesystem/etc behaves. You don't even need io_uring, it works withwrite(2)
/etc as well.Network send and recv zero copy is different topic.
SQ ring helps with not copying the SQE structure (64 bytes per request) into the kernel, but I doubt you care.
Edit: silly typo, it's
O_DIRECT