Attention is currently required from: Hoernchen, fixeria, jolly, laforge, pespin.
jolly uploaded patch set #2 to this change.
The following approvals got outdated and were removed: Code-Review+1 by pespin, Code-Review+2 by Hoernchen, Verified+1 by Jenkins Builder
The change is no longer submittable: Code-Review and Verified are unsatisfied now.
Prevent poll() in select.c to timeout too early
Adjust osmo_timers_nearest_ms() to round up the remaining time.
Note that poll() has a granularity of 1 millisecond.
Previously, when rounding down the remaining time, osmo_select_main()
would return too early, before the nearest timer timed out.
Consequently, the main loop repeatedly called osmo_select_main() until
the timer actually timed out, resulting in excessive CPU usage.
By modifying osmo_timers_nearest_ms() to round up the remaining time,
we ensure accurate timeout calculations, preventing unnecessary CPU
consumption during the main loop.
The patch only applies to non-embedded version of libosmocore, because
the impact on embedded systems is not verified tested.
Related: OS#6339
Change-Id: I79de77c79af4d50d1eb9ca0c5417123ff760dca3
---
M src/core/timer.c
1 file changed, 34 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/72/35672/2
To view, visit change 35672. To unsubscribe, or for help writing mail filters, visit settings.