-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
logging: Trigger logging thread when above threshold #75806
logging: Trigger logging thread when above threshold #75806
Conversation
Hello @thales-nascimento, and thank you very much for your first pull request to the Zephyr project! |
subsys/logging/log_core.c
Outdated
@@ -184,7 +184,7 @@ static void z_log_msg_post_finalize(void) | |||
K_MSEC(CONFIG_LOG_PROCESS_THREAD_SLEEP_MS), | |||
K_NO_WAIT); | |||
} else if (CONFIG_LOG_PROCESS_TRIGGER_THRESHOLD && | |||
(cnt + 1) == CONFIG_LOG_PROCESS_TRIGGER_THRESHOLD) { | |||
(cnt + 1) >= CONFIG_LOG_PROCESS_TRIGGER_THRESHOLD) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will prolong time needed to log all logging messages when cnt
exceeds the threshold. What about adding
k_timer_stop(&log_process_thread_timer);
k_sem_give(&log_process_thread_sem);
to z_log_dropped
instead? If we start to drop messages then it's a good time to wake up the processing thread.
Can you try if that helps in your case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed that it also solves my case, changes applied.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, is there some action needed from my side for this pull request?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we are currently in a hard freeze for the v3.7 release.
That is scheduled for release on Friday, and PR's can be merged again after that.
https://github.com/zephyrproject-rtos/zephyr/wiki/Release-Management
Wake up logging thread when we start to drop messages. Signed-off-by: Thales Bacelar <thalesbacelar@duck.com>
3105508
to
715e5cd
Compare
Hi @thales-nascimento! To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge. Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁 |
Trigger logging thread also when above CONFIG_LOG_PROCESS_TRIGGER_THRESHOLD.
Fixes #75736