Skip to content

Conversation

@ardera
Copy link
Owner

@ardera ardera commented Apr 28, 2025

The eventfd that was used to notify the event listener isolate of new/changed CAN sockets (or generally, file descriptors) was never cleared after the notification has been handled. That meant it was checked again all the time, causing high CPU usage.

Fixes #38

@ardera ardera force-pushed the fix/epoll-performance branch 4 times, most recently from 26563b5 to 0cb929f Compare April 30, 2025 06:48
ardera added 13 commits April 30, 2025 10:34
* rename real CAN test setup `pi3-can ==> double-can`
* reformat
* change expected txQueueLength to 1024
* change expected sendBufSize to 26*4096
* enable frame filter tests for hardware CAN setup as well
* throw StateError on Unexpected isolate message, rather than failing an assert
* terminate event listener isolate in both double-can and vcan tests
Instead of waiting for the roundtrip with the "Stop" event to the event listener isolate to complete.
Makes test output a bit easier to follow.
Also state can get a bit broken if other tests
are executed while a previous test is still kinda
running.
So they're not tested by melos run test.

Also, invoke melos commands directly instead of via `dart pub global run melos`.
@ardera ardera force-pushed the fix/epoll-performance branch from d141c91 to 030c268 Compare April 30, 2025 08:38
@ardera ardera force-pushed the fix/epoll-performance branch from 030c268 to ab2c8c4 Compare April 30, 2025 09:25
@ardera ardera merged commit ac108fa into main Apr 30, 2025
2 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.

linux_can with ubuntu 22.04 desktop cause high cpu usage

2 participants