Skip to content

Threads #204

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Threads #204

wants to merge 3 commits into from

Conversation

rjarry
Copy link
Collaborator

@rjarry rjarry commented Apr 18, 2025

No description provided.

rjarry added 3 commits April 18, 2025 14:53
Instead of polling an atomic boolean value with micro sleeps, use
pthread condition objects that are designed exactly for signaling
between threads.

This allows the kernel to properly schedule waiting threads until they
need to be woken up.

This will be leveraged in future commits to keep worker threads alive
all the time even when they don't have any RXQ to poll.

Signed-off-by: Robin Jarry <[email protected]>
Be consistent and use the same "grout:" prefix for all threads created
by grout.

Signed-off-by: Robin Jarry <[email protected]>
Keep one worker thread per CPU in the datapath affinity mask. Only
destroy threads when removing CPUs from that mask. Now that threads are
waiting for a pthread condition, this will not consume any cycles on
these CPUs and will allow the kernel to change the C-state / P-state of
the cores accordingly.

Moreover, since the threads are now always started, moving rxqs around
should be faster.

Signed-off-by: Robin Jarry <[email protected]>
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.

1 participant