3 ms·
Coincidentally last night I announced [0] a little io_uring systemd-journald tool I've been hacking on recently for fun. No ebpf component at this time, but I
by pengaru 6y ago
Coincidentally last night I announced [0] a little io_uring systemd-journald tool I've been hacking on recently for fun.
No ebpf component at this time, but I do wonder if ebpf could perform journal searches in the kernel side and only send the matches back to userspace.
Another thing this little project brought to my attention is the need for a compatibility layer on pre-io_uring kernels. I asked on io_uring@vger [1] last night, but nobody's responded yet, does anyone here know if there's already such a thing in existence?
[0] https://lists.freedesktop.org/archives/systemd-devel/2020-November/045641.html https://lists.freedesktop.org/archives/systemd-devel/2020-No...
[1] https://lore.kernel.org/io-uring/20201126043016.3yb5ggpkgvuzhudw@shells.gnugeneration.com/T/#u https://lore.kernel.org/io-uring/20201126043016.3yb5ggpkgvuz...
- cycloptic 6y agoI was thinking about doing this for an event loop I was working on, but no code to show yet... you probably can get away easily with using pthreads and a sparse memfd to store the buffers.
- cycloptic 6y ago(Reply since I can't edit anymore) The only catch is that with that approach, you can't poll on the fd like you can with the real thing.
- pengaru 6y agoAssuming you're talking about emulating io_uring in userspace at the liburing API level, couldn't you just use a pthreads thread pool for the syscall dispatching from submitted SQEs, and when those complete their results get serialized into the CQE. For fd-based monitoring of the CQE, wouldn't a simple pipe or eventfd suffice? When CQEs get added, write to the fd, it just happens to all be in-process. I must admit I haven't gone deep into the liburing internals or the low-level io_uring API, but conceptually speaking there doesn't seem to be anything happening that can't be done in-process in userspace atop pthreads for the blocking syscalls. It just won't be fast. Am I missing some critical show-stopping detail?
- anarazel 6y agoI'd like something roughly similar, to make the rr reverse debugger support io_uring. That likely can't work like most other syscalls, due to the memory only interface...
- roca 6y agoI have some thoughts about io_uring support in rr: https://github.com/rr-debugger/rr/issues/2613 https://github.com/rr-debugger/rr/issues/2613