News for hackers. Stuff that matters.
Re:Io_uring is not an event system by Filligree on Thursday June 17, 2021 @12:55PM (#27541743)
Which is every program that wants to be fast, on modern computers. So...
Re:Io_uring is not an event system by masklinn on Thursday June 17, 2021 @01:13PM (#27541951)
Nonsense.

Let's say your program wants to list a directory, if it has nothing to do during that time then there is no point to using an asynchronous model, that only adds costs and complexity.

Re:Io_uring is not an event system by ot on Thursday June 17, 2021 @05:42PM (#27544772)
Let's say your program wants to list a directory and sort by mtime, or size. You need to stat all those files, which means reading a bunch of inodes. And your directory is on flash, so you'll definitely want to pipeline all those operations.

How do you do that without an async API? Thread pool and synchronous syscalls? That's not simpler.

Re:Io_uring is not an event system by masklinn on Friday June 18, 2021 @06:13AM (#27548956)
…

At no point did I say that these APIs were not useful? I’m literally the person who explained what kind of uses would be simplified by async syscalls.

And you can keep your strawman to yourself. I objected to the statement that it would make all programs faster / simpler, the argument that it would make some simpler or faster is not something I ever argued against.

Re:Io_uring is not an event system by ot on Friday June 18, 2021 @10:24AM (#27550636)
> I objected to the statement that it would make all programs faster / simpler

And I pointed out that even the simplest example you could come up with can in fact be made faster (than implementing sequentially) or simpler (than implementing with threads, which require synchronization) with an async API. So I don't see the straw man.

Pretty much anything that needs to interact with the kernel can benefit from this.

Re:Io_uring is not an event system by masklinn on Thursday June 24, 2021 @01:49PM (#27621360)
> And I pointed out that even the simplest example you could come up with can in fact be made faster (than implementing sequentially) or simpler (than implementing with threads, which require synchronization) with an async API.

No, you pointed out that a different example could be made faster (and almost certainly at the cost of simplicity, the mention of which you carefully avoided).

> So I don't see the straw man.

That doesn't surprise me.

Re:Io_uring is not an event system by wtallis on Thursday June 17, 2021 @01:25PM (#27542073)
True. But as soon as your program wants to list two directories and knows both names ahead of time, you have an opportunity to fire off both operations for the kernel to work on simultaneously.

And even if your program doesn't have any opportunity for doing IO in parallel, being able to chain a sequence of IO operations together and issue them with at most one syscall may still get you improved latency.

Re:Io_uring is not an event system by touisteur on Thursday June 17, 2021 @01:53PM (#27542384)
Yes and even clustering often-used-together syscalls... An interesting 2010 thesis https://os.itec.kit.edu/deutsch/2211.php and https://www2.cs.arizona.edu/~debray/Publications/multi-call.... for something called 'multi-calls'

Interesting times.