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

log: yield periodically while dumping logs #2411

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nkaje
Copy link

@nkaje nkaje commented Nov 9, 2020

The logs are processed in the default task.
In cases where there are a lot of logs to be
processed, the idle task may get blocked from
running, resulting in a watchdog bite. Address
this by periodically putting ourselves on the
sleep list.

Signed-off-by: Naveen Kaje [email protected]

The logs are processed in the default task.
In cases where there are a lot of logs to be
processed, the idle task may get blocked from
running, resulting in a watchdog bite. Address
this by periodically putting ourselves on the
sleep list.

Signed-off-by: Naveen Kaje <[email protected]>
@apache-mynewt-bot
Copy link

Style check summary

No suggestions at this time!

@kasjer
Copy link
Contributor

kasjer commented Nov 22, 2020

Maybe instead of yielding code could feed watchdog.
If we have two tasks that are busy even if they go to sleep periodically it may happen that they will switch between them and idle will never feed watchdog.

But it could be that watchdog is not initialized at all then feeding it could not be the right thing to do, but yielding without watchdog running will just make walk slower.

@benmccrea
Copy link
Contributor

benmccrea commented Dec 15, 2020

@nkaje When it yields to another task, will a problem occur if the new task creates a new log entry while the dump is still in progress? I think I agree with @kasjer that it would be preferable to feed the watchdog. Perhaps a MYNEWT_VAL could be checked to determine if the watchdog is enabled?

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.

4 participants