-
Thanks for your work on Looking at standard operations like ssize_t read(int fildes, void *buf, size_t nbyte);
// error in errno The interface in struct io_uring_sqe {
// ...
// The amount to read.
__u32 len;
// ...
};
struct io_uring_cqe {
__s32 res;
// if negative, contains error, if positive contains amount read.
}; It seems to me that the use of As a point of comparison/reference, struct kevent {
uintptr_t ident; /* identifier for this event */
short filter; /* filter for event */
u_short flags; /* action flags for kqueue */
u_int fflags; /* filter flag value */
intptr_t data; /* filter data value */
void *udata; /* opaque user data identifier */
}; The use case is a bit different but it stands to reason they could represent
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Linux imposes INT_MAX as the maximum transfer size, which is why io_uring uses the types that it does. read(2) and write(2) has the same limit, even if the interface itself takes a size_t. For Ruby, I guess capping it at 2G would be sensible and ensure that it matches what io_uring is able to do per request? |
Beta Was this translation helpful? Give feedback.
-
Or maybe, since it's the same regardless of what system call you use to transfer IO on Linux, you can just ignore it? If someone attempts a > 2GB IO request, it'll essentially just look like a short read/write to the application. |
Beta Was this translation helpful? Give feedback.
Or maybe, since it's the same regardless of what system call you use to transfer IO on Linux, you can just ignore it? If someone attempts a > 2GB IO request, it'll essentially just look like a short read/write to the application.