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

CPU Pinning #3

Open
abelpc opened this issue Apr 7, 2020 · 3 comments
Open

CPU Pinning #3

abelpc opened this issue Apr 7, 2020 · 3 comments
Labels

Comments

@abelpc
Copy link

abelpc commented Apr 7, 2020

Will there be any support for CPU pinning? I know it may need some more scheduling extensions, but this would be a very useful need for some sort of workloads where locality inside a NUMA node matters.

@shiyanhui
Copy link
Owner

Good question.

To a coroutine library, there is two kinds of CPU pinning,

  • Bind the thread to CPU.
  • Bind the coroutine(in libcsp it's called process) to CPU.

Currently libcsp only implements the first one(that's why it's so fast). Sometimes it may be a bad idea to bind a task process to a CPU since other CPUs may starve. What we can do is to try the best to do it without guarantee. Anyway I'll try to implement the second one.

@abelpc
Copy link
Author

abelpc commented Apr 7, 2020

I would personally be interested indeed in the second one. Let the OS decides about which process starves since this would be the user's choice. However, it would perhaps be best to allow/enable users with ways to query the current scheduling state done by libcsp. That's mostly for debugging concerns.

@shiyanhui
Copy link
Owner

Yeah, it's important to add the related debugging tools. Libcsp will support it in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants