Attention is currently required from: laforge, pespin.
jolly 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 10:
(7 comments)
Commit Message:
https://gerrit.osmocom.org/c/libosmocore/+/40725/comment/e95cf057_9b995286?… :
PS9, Line 23: to determine when all submissions are completed.
Sounds like an easy thing to add right? It makes sense
to implement this either her eor on a follow- […]
I added a counter in a different
patch and destry old rings, once empty. I hope that all cancelled SQE will be completed,
not only the cancellation SQEs. If not, the ring would not be destroyed, so this would not
cause any harm.
File src/core/osmo_io_internal.h:
https://gerrit.osmocom.org/c/libosmocore/+/40725/comment/a700383a_0fecc145?… :
PS9, Line 110: bool read_enabled;
(At some point it may make sense to properly put all
these fields into a "read" and "write" substruc […]
There is a
later patch that does this.
File src/core/osmo_io_uring.c:
https://gerrit.osmocom.org/c/libosmocore/+/40725/comment/64de0ab5_adfed9dc?… :
PS2, Line 175:
ok, then please mention this fact explicitly in this c
ommit in a TODO-comment and also in the commi […]
I added the comments. I think that
a counter cannot be used, as we don't know if we get one or two CQEs after cancelling
an SQE. We always get the CQE for the cancellation SQE. If an SQE gets completed while
sending a cancellation, we get two CQEs.
File src/core/osmo_io_uring.c:
https://gerrit.osmocom.org/c/libosmocore/+/40725/comment/123a753e_15996863?… :
PS9, Line 126: g_ring = talloc_zero(OTC_GLOBAL, struct osmo_io_uring);
are you sure OTC_GLOBAL is defined at this point? Or
is it actually NULL? […]
IT is definitly defined and not NULL.
The contructor in context.c
"static __attribute__((constructor(101))) void on_dso_load_ctx(void)"
has higher priority than any other constructor, including the initialization of
osmo_io_uring.
https://gerrit.osmocom.org/c/libosmocore/+/40725/comment/3368db83_9e78fefb?… :
PS9, Line 175: g_io_uring_size *= 2;
Once you move this to an unsigned, you can do
"<< 1" here. […]
Done, see previous patch.
https://gerrit.osmocom.org/c/libosmocore/+/40725/comment/c1be736e_aafa80c0?… :
PS9, Line 208: /* All subsequent read SQEs must be on the same ring. */
This should imho go inside iofd_uring_get_sqe(), based
on "current_ring" being passed to it.
iofd_uring_get_sqe() has no
knowledge about the iofd, so it doesn't know if there are SQEs already submitted to a
different ring than the current one.
(iofd->u.uring.read_ring)
https://gerrit.osmocom.org/c/libosmocore/+/40725/comment/69b446a2_baf1f6fc?… :
PS9, Line 282: while (iofd->u.uring.reads_submitted <
((iofd->u.uring.num_read_sqes) ? : g_io_uring_read_sqes)) {
why is the g_io_uring_read_sqes reference needed here?
How can iofd have num_read_sqes = 0, and if i […]
g_io_uring_read_sques is 1 by
default. This can be changed by environment variable, to allow benchmarking. The user may
also define the number of of SQEs via API. This should override the default or what has
been set by envrironment variable.
if iofd instance is created, num_read_sqes (read.num_sques now) is not set by the user, so
that it is 0.
--
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: 10
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 08 Aug 2025 13:57:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: jolly <andreas(a)eversberg.eu>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>