strace of io_uring events?
Pavel Begunkov
asml.silence at gmail.com
Wed Jul 15 20:20:26 UTC 2020
On 15/07/2020 23:09, Miklos Szeredi wrote:
> On Wed, Jul 15, 2020 at 9:43 PM Pavel Begunkov <asml.silence at gmail.com> wrote:
>>
>> To clear details for those who are not familiar with io_uring:
>>
>> io_uring has a pair of queues, submission (SQ) and completion queues (CQ),
>> both shared between kernel and user spaces. The userspace submits requests
>> by filling a chunk of memory in SQ. The kernel picks up SQ entries in
>> (syscall io_uring_enter) or asynchronously by polling SQ.
>>
>> CQ entries are filled by the kernel completely asynchronously and
>> in parallel. Some users just poll CQ to get them, but also have a way
>> to wait for them.
>>
>>>>>
>>>>> What do people think?
>>>>>
>>>>> From what I can tell, listing the submitted requests on
>>>>> io_uring_enter() would not be hard. Request completion is
>>>>> asynchronous, however, and may not require io_uring_enter() syscall.
>>>>> Am I correct?
>>
>> Both, submission and completion sides may not require a syscall.
>
> Okay.
>
>>>>> Is there some existing tracing infrastructure that strace could use to
>>>>> get async completion events? Should we be introducing one?
>>
>> There are static trace points covering all needs.
>
> This needs to be unprivileged, or its usefulness is again compromized.
>
>>
>> And if not used the whole thing have to be zero-overhead. Otherwise
>> there is perf, which is zero-overhead, and this IMHO won't fly.
>
> Obviously it needs to be zero overhead if not tracing.
>
> What won't fly?
Any approach that is not "zero-overhead if not used".
--
Pavel Begunkov
More information about the Strace-devel
mailing list