Callbacks in io_uring submission queue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello. Recently I was busy making a coroutine executor. It was going
smoothly until the point where I needed to read from stdin. It turns
out that the default way to do it blocks the thread that executes the
read. This is not an acceptable situation for the worker thread which
should execute as many pieces of work as possible. I tried to find how
to do asynchronous io in Linux, but among the variety of things I came
across on the web, the io_uring appeared as an appropriate solution at
first sight. Sadly, soon after going deeper into the io_uring's
interface, I discovered that the only way to know about the completion
of submitted work is through polling. This appeared quite counter to
the premise of asynchronous io, which is to eliminate waiting on
things.
Dissatisfied with my findings I tried to see if any other os provided
a better interface, and I found one conceptually interesting
approach... in Apple's Metal. In that graphics framework, it is
possible to ask the system for a command buffer and then put in it a
user-provided callback, which the system will execute when it
processes that buffer.

Is it possible to put a callback in io_uring which the system will
execute without polling the thing?



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux