Originally posted by coder
View Post
Announcement
Collapse
No announcement yet.
Linux Work Culminating On A "READFILE" Syscall For Reading Small Files Efficiently
Collapse
X
-
-
IMHO this is really bad system call and kernel ABI design. Pointless endeavour for non mition critical / high performance use case. Instead what would be amazing would be vectored / bundled system calls that would also be useful for actual high performance stuff, you know databases, fileserver and fun stuff like that: https://www.youtube.com/watch?v=84Uyh3KwY-w
Leave a comment:
-
Originally posted by jacob View Post
There are many (really MANY) more indirect dispatches involved during the processing of a single call. VFS, LSM, namespace resolution are but a few that pop up on my mind. Adding another one makes exactly zero measurable difference in processing performance but if it means having a cleaner and more coherent kernel interface I'm all for it.
Leave a comment:
-
Originally posted by jacob View Post
This is a wrapper over splice and doesn't work the way I want. You need to wait on in_fd and trigger the transfer for every batch of data (with unnecessary user-kernel trampoline every time), in_fd can't be a socket etc. It works for what it's intended to do, which is a file server, but it doesn't work for something like an on-demand tunnel manager. What I would like is to be able to "attach" an input file descriptor to an output one and have all data simply pass through (for example from socket to socket, or from local socket to inet socket etc.) with no further intervention.
Leave a comment:
-
+1 to Justin.
Can others stfu about ioctls already? They operate on file descriptors. That means you need to open(), do the ioctl() then close(). What's the fucking difference compared to a normal read?
The whole point of this syscall is to avoid the open() and close() syscalls.
Leave a comment:
-
Originally posted by jacob View PostThere are many (really MANY) more indirect dispatches involved during the processing of a single call. VFS, LSM, namespace resolution are but a few that pop up on my mind. Adding another one makes exactly zero measurable difference in processing performance
All those other things actually have a purpose and provide some kind of value, whereas pointlessly doing this the slow and ugly way because "meh, some other things are slow too" is not a very engineer-like mindset. I would expect that kind of thing from schmuck JavaScript "developers", not kernel hackers.Last edited by JustinTurdeau; 25 May 2020, 06:10 PM.
- Likes 1
Leave a comment:
-
Pretty excited about this; io_uring and readfile combined is going to significantly speedup anything that heavily reads from things like procfs. I'm currently in the early stages of implementing a stripped-down top clone in Rust for fun, and can't wait to use those technologies.
- Likes 2
Leave a comment:
-
Originally posted by JustinTurdeau View Post
Right, but ioctls are essentially doing double dispatch. Once for the ioctl syscall itself and then again depending on the arguments. Why do double dispatch for no reason? Just to be contrarian?
Leave a comment:
-
Originally posted by ryao View Postioctls are also implemented in drivers rather than in the VFS, so ignoring the reality that it is not possible to do this via an ioctl (possibly via a device node in /dev) and somehow doing it anyway would be a mess. You really want an ioctl when controlling a device, not when doing a VFS operation.
Even tough nobody likes the ioctl, there are a lot of cases where an ioctl is the unique way to go...
Leave a comment:
Leave a comment: