Skip to content

Per-thread Task Lists #682

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

Closed
eholk opened this issue Jul 13, 2011 · 1 comment
Closed

Per-thread Task Lists #682

eholk opened this issue Jul 13, 2011 · 1 comment
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows

Comments

@eholk
Copy link
Contributor

eholk commented Jul 13, 2011

We should use per-thread task lists. This means there will be a lot less contention on the scheduler lock, but it also makes load balancing harder.

@ghost ghost assigned eholk Jul 13, 2011
@eholk
Copy link
Contributor Author

eholk commented Jul 23, 2011

I think I'm going to start working on this now. I ran Instruments.app on word-count.rs, and 75% of the time is spent on locking, most of which is in the scheduler lock.

The design I'm going to tentatively adopt is to merge rust_scheduler and rust_task_thread, so we create multiple schedulers and each one has its own thread (this is really similar to the old rust_domain model...). For now, I'll make it so that when you create a task, the kernel picks a random scheduler to create it on, and tasks just stay on the same scheduler for their whole lifetime. We can add load balancing (probably in the form of work stealing) later.

@eholk eholk closed this as completed Jul 27, 2011
eholk pushed a commit to eholk/rust that referenced this issue Jul 27, 2011
Tasks are spawned on a random thread. Currently they stay there, but
we should add task migration and load balancing in the future. This
should drammatically improve our task performance benchmarks.
@eholk eholk removed their assignment Jun 16, 2014
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows
Projects
None yet
Development

No branches or pull requests

1 participant