Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH v4] linux-gen: timer: avoid overrun debug prints if no timers started #1940

Merged

Conversation

JereLeppanen
Copy link
Collaborator

Don't print timer pool "overrun" and "scans missed" debug prints, if no timers have been started.

@odpbuild odpbuild changed the title linux-gen: timer: avoid overrun debug prints if no timers started [PATCH v1] linux-gen: timer: avoid overrun debug prints if no timers started Oct 27, 2023
@JereLeppanen JereLeppanen force-pushed the dev/fix-timer-pool-scans-missed branch from 332269a to 8d212b9 Compare October 27, 2023 12:48
@odpbuild odpbuild changed the title [PATCH v1] linux-gen: timer: avoid overrun debug prints if no timers started [PATCH v2] linux-gen: timer: avoid overrun debug prints if no timers started Oct 27, 2023
@JereLeppanen
Copy link
Collaborator Author

v2:

  • Fix checkpatch errors.

@@ -828,14 +833,14 @@ static inline void timer_pool_scan_inline(int num, odp_time_t now)
continue;

if (odp_atomic_cas_u64(&tp->cur_tick, &old_tick, new_tick)) {
if (tp->notify_overrun && diff > 1) {
if (odp_atomic_load_u32(&tp->notify_overrun) == 1 && diff > 1) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ODP_DEBUG_PRINT could be added as the first condition to completely remove the potential performance hit. Same comment for timer_run_posix().

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v3.

@JereLeppanen JereLeppanen force-pushed the dev/fix-timer-pool-scans-missed branch from 8d212b9 to 5434486 Compare November 6, 2023 12:47
@odpbuild odpbuild changed the title [PATCH v2] linux-gen: timer: avoid overrun debug prints if no timers started [PATCH v3] linux-gen: timer: avoid overrun debug prints if no timers started Nov 6, 2023
Don't print timer pool "overrun" and "scans missed" debug prints, if
no timers have been started.

Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
@JereLeppanen JereLeppanen force-pushed the dev/fix-timer-pool-scans-missed branch from 5434486 to 6b72d09 Compare November 6, 2023 14:21
@odpbuild odpbuild changed the title [PATCH v3] linux-gen: timer: avoid overrun debug prints if no timers started [PATCH v4] linux-gen: timer: avoid overrun debug prints if no timers started Nov 6, 2023
@JereLeppanen
Copy link
Collaborator Author

v4:

  • Rebase.
  • Add review tags.

@MatiasElo MatiasElo merged commit e0f0341 into OpenDataPlane:master Nov 7, 2023
174 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants