Attention is currently required from: jolly, laforge.
pespin has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmocore/+/40725?usp=email )
Change subject: Automatically increase io_uring, if too small. ......................................................................
Patch Set 6:
(7 comments)
Patchset:
PS6: Due to the comments I wrote I still personally believe this is shooting us in the foot, it's not the best approach and that we should instead at least first try to write a patch where we keep "iofds waiting to get an SQE" in a llist if getting an sqe fails. Then, when we receive a "op complete" event, we iterate over the llist to try to get sqes for those again.
File src/core/osmo_io_internal.h:
https://gerrit.osmocom.org/c/libosmocore/+/40725/comment/df1bd146_19aa76bb?u... : PS6, Line 116: /* ! array of rings the submitted read SQEs have been submitted */ "have been submitted to"
File src/core/osmo_io_uring.c:
https://gerrit.osmocom.org/c/libosmocore/+/40725/comment/4a7bb479_e63ce609?u... : PS6, Line 115: g_ring = calloc(1, sizeof(*g_ring)); use talloc.
https://gerrit.osmocom.org/c/libosmocore/+/40725/comment/16e4f1cb_10686776?u... : PS6, Line 164: LOGP(DLIO, LOGL_NOTICE, "increasing io_uring size to %d.\n", g_io_uring_size); Please put this into 1 single LOGP.
https://gerrit.osmocom.org/c/libosmocore/+/40725/comment/80ee0ddc_530c1847?u... : PS6, Line 172: sqe = io_uring_get_sqe(&g_ring->ring); so here we end up with 2 read SQEs on 2 different queues. How do we now we receive the read completion events in correct order? Which API guarantees that?
https://gerrit.osmocom.org/c/libosmocore/+/40725/comment/1bb55483_4e6c40ad?u... : PS6, Line 527: while ((sqe = io_uring_get_sqe(iofd->u.uring.read_ring[idx])) == NULL); that looks like a really nice tight non-blocking loop filling the CPU?
https://gerrit.osmocom.org/c/libosmocore/+/40725/comment/f000786a_eb273a43?u... : PS6, Line 543: while ((sqe = io_uring_get_sqe(iofd->u.uring.write_ring)) == NULL); that looks like a really nice tight non-blocking loop filling the CPU?