News for hackers. Stuff that matters.
Re:Spectre mitigations murder userspace performance by emilfihlman on Saturday June 19, 2021 @09:39AM (#27560374)
Can we have syscall chaining finally? Please? There is literally no reason why we couldn't have it.
Re:Spectre mitigations murder userspace performance by Filligree on Saturday June 19, 2021 @09:43AM (#27560399)
Do you mean io_uring?
Re:Spectre mitigations murder userspace performance by emilfihlman on Saturday June 19, 2021 @03:29PM (#27563630)
No. Io_uring is a message passing system where you tell the kernel to do something and let you know when it's done.

Syscall chaining refers to having the kernel execute consecutive systemcalls without switching the context back to userspace.

An example of this might be closing a multitude of file descriptors or registering signals or writing the same data to multiple fds etc, which becomes prohibitely expensive if you need to do it multiple times quickly, and actually doing it even once is really expensive if your sets are large.

Re:Spectre mitigations murder userspace performance by dsp on Saturday June 19, 2021 @07:44PM (#27565620)
> having the kernel execute consecutive systemcalls without switching the context

io_uring enables exactly this

https://kernel.dk/io_uring.pdf

Re:Spectre mitigations murder userspace performance by emilfihlman on Sunday June 20, 2021 @09:13AM (#27569622)
Only for io, which is not the same thing.
Re:Spectre mitigations murder userspace performance by dsp on Sunday June 20, 2021 @12:47PM (#27571743)
Despite the name, there is nothing io-specific about the io_uring interface. Non-io syscalls can be added. Io syscalls just tend to benefit the most (due to call frequency).
Re:Spectre mitigations murder userspace performance by quotemstr on Saturday June 19, 2021 @07:38PM (#27565576)
> Syscall chaining refers to having the kernel execute consecutive systemcalls without switching the context back to userspace.

io_uring already gives you that. You can submit multiple operations in a batch and link the operations together so that if one operation in a chain of linked operations fails, io_uring won't try to execute the rest.

Re:Spectre mitigations murder userspace performance by emilfihlman on Sunday June 20, 2021 @09:13AM (#27569621)
Which is not syscall chaining, but message chaining, of io.
Re:Spectre mitigations murder userspace performance by quotemstr on Sunday June 20, 2021 @05:42PM (#27574174)
Huh? It is literally system call chaining. You can make many system calls via io_ioring.
Re:Spectre mitigations murder userspace performance by hinkley on Saturday June 19, 2021 @01:32PM (#27562458)
Doesn’t that address fanout, not chaining?

Chaining RPC calls requires something more sophisticated.

Re:Spectre mitigations murder userspace performance by emilfihlman on Saturday June 19, 2021 @03:31PM (#27563642)
Io_uring doesn't even address fanout if you mean writing the same data to multiple fds.

Io_uring is just a way to have "do this and tell me when it's done" io.

Re:Spectre mitigations murder userspace performance by Jweb_Guru on Saturday June 19, 2021 @06:57PM (#27565283)
I imagine extensions to eBPF are more likely.