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?usp=email
 :
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?usp=email
 :
PS6, Line 115:  g_ring = calloc(1, sizeof(*g_ring));
use talloc.


https://gerrit.osmocom.org/c/libosmocore/+/40725/comment/16e4f1cb_10686776?usp=email
 :
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?usp=email
 :
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?usp=email
 :
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?usp=email
 :
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?



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/40725?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id9230146acc8d54bfd44834e783c31b37bd64bca
Gerrit-Change-Number: 40725
Gerrit-PatchSet: 6
Gerrit-Owner: jolly <andr...@eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-CC: pespin <pes...@sysmocom.de>
Gerrit-Attention: jolly <andr...@eversberg.eu>
Gerrit-Attention: laforge <lafo...@osmocom.org>
Gerrit-Comment-Date: Wed, 30 Jul 2025 11:43:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

Reply via email to