On Wed, 2021-05-05 at 23:17 -0400, Olivier Langlois wrote: > Note that the poll remove sqe and the following poll add sqe don't have > exactly the same user_data. > > I have this statement in between: > /* increment generation counter to avoid handling old events */ > ++anfds [fd].egen; > > poll remove cancel the previous poll add having gen 1 in its user data. > the next poll add has it user_data storing gen var set to 2: > > 1 3 remove 85 1 > 1 3 add 85 2 > > 85 gen 1 res -125 > 85 gen 1 res 4 > Good news! I have used the io_uring tracepoints and they confirm that io_uring works as expected: For the above printfs, I get the following perf traces: 11940.259 Execution SVC/134675 io_uring:io_uring_submit_sqe(ctx: 0xffff9d3c4368c000, opcode: 7, force_nonblock: 1) 11940.270 Execution SVC/134675 io_uring:io_uring_complete(ctx: 0xffff9d3c4368c000, user_data: 4294967382, res: -125) 11940.272 Execution SVC/134675 io_uring:io_uring_complete(ctx: 0xffff9d3c4368c000) 11940.275 Execution SVC/134675 io_uring:io_uring_file_get(ctx: 0xffff9d3c4368c000, fd: 86) 11940.277 Execution SVC/134675 io_uring:io_uring_submit_sqe(ctx: 0xffff9d3c4368c000, opcode: 6, user_data: 4294967382, force_nonblock: 1) 11940.279 Execution SVC/134675 io_uring:io_uring_complete(ctx: 0xffff9d3c4368c000, user_data: 4294967382, res: 4) So, it seems the compiler is playing games on me. It prints the correct gen 2 value but is passing 1 to io_uring_sqe_set_data()... I'll try to turn optimization off to see if it helps. thx a lot again for your exceptional work!