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

Improve syscalls worker #28

Merged
merged 1 commit into from
Jan 7, 2025
Merged

Improve syscalls worker #28

merged 1 commit into from
Jan 7, 2025

Conversation

erthalion
Copy link
Collaborator

Remove unneeded thread spawning (this will produce more load), allow to run in a tight loop and to specify the syscall.

@erthalion erthalion force-pushed the feature/syscalls branch 2 times, most recently from d3345f9 to d00073c Compare August 12, 2024 10:55
Copy link
Contributor

@Molter73 Molter73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

counter += 1;
// Do the syscall directly, without spawning a thread (it would
// introduce too much overhead for a quick syscall).
worker.do_syscall(syscall).unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Panicking here is probably fine, but returning an error could be a bit more user friendly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eventually I got rid of the result altogether, to get slightly less overhead per iteration.

Remove unneeded thread spawning (this will produce more load), allow to
run in a tight loop and to specify the syscall.
@erthalion erthalion merged commit 2b7d851 into main Jan 7, 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.

2 participants