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

watchdog_kick: non-allocating #22892

Merged
merged 4 commits into from
Nov 17, 2021
Merged

watchdog_kick: non-allocating #22892

merged 4 commits into from
Nov 17, 2021

Conversation

deanlee
Copy link
Contributor

@deanlee deanlee commented Nov 12, 2021

No description provided.

@pd0wm
Copy link
Contributor

pd0wm commented Nov 15, 2021

Is this really an issue? If it is, should we just write the 4 bytes of the uint64 timestamp in the watchdog file and struct.unpack it on the python side?

@deanlee deanlee marked this pull request as draft November 15, 2021 12:57
@deanlee
Copy link
Contributor Author

deanlee commented Nov 15, 2021

~25% of the QUIState::update()'s time is spent on watchdog_kick when onroad. think it's better not to waste any cpu on unnecessary things even just a tiny bit.

@pd0wm
Copy link
Contributor

pd0wm commented Nov 15, 2021

We also don't need to kick the watchdog on every update() call. Maybe that got changed in one of the refactors? The timeout is 5 seconds, so it's fine to only call kick every second.

@pd0wm
Copy link
Contributor

pd0wm commented Nov 17, 2021

Good to merge?

@deanlee
Copy link
Contributor Author

deanlee commented Nov 17, 2021

yes

@pd0wm pd0wm marked this pull request as ready for review November 17, 2021 11:02
@pd0wm pd0wm merged commit ca88a87 into commaai:master Nov 17, 2021
@deanlee deanlee deleted the watchdog branch November 17, 2021 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants