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

Excessive CPU usage when running CAN port #1

Open
petebannister opened this issue Sep 15, 2020 · 0 comments
Open

Excessive CPU usage when running CAN port #1

petebannister opened this issue Sep 15, 2020 · 0 comments

Comments

@petebannister
Copy link

Due to:

#define LDX_CAN_DEF_TOUT_SEC 0
#define LDX_CAN_DEF_TOUT_USEC 0

The select call in the CAN thread does not block. If non-blocking behaviour would be preferred here, what is the point of using a thread at all? sched_yield does not help to drop the cpu much below 100%.

I would have preferred to be able to open the port and not have a thread created on your behalf. The documentation does not even mention that it starts a thread.

If I hack something to tweak the can_tout value in the private data then there is drastic improvement in CPU.

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

No branches or pull requests

1 participant