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

More gracefully handle requests for exclusive cores when there are fewer cores than exclusive cores requested. #41

Open
hq6 opened this issue Mar 28, 2018 · 1 comment

Comments

@hq6
Copy link
Member

hq6 commented Mar 28, 2018

John's suggestion:

In an ideal world, we should first place this thread poorly, ask for more cores, and re-place it when more cores become available.
When a core arrives, reconsider everything. Ask Arachne to tell you about all the threads that have a particular class. Then we find all the ones that are marked exclusive and see "are they in fact exclusive?"
If not, then fix it.

This mechanism should fix other races with incorrectly placed threads.

@hq6 hq6 changed the title More gracefully handle requests for exclusive cores when none are available More gracefully handle requests for exclusive cores when there are fewer cores than exclusive cores requested. Mar 28, 2018
@hq6 hq6 added the enhancement label May 9, 2018
@hq6
Copy link
Member Author

hq6 commented May 9, 2018

One possibility: Block until an exclusive core can be made available through the arbiter, with some timeout (maybe arbiter preemption timeout)

Another possibility: Put it on the unmanaged core as a kernel thread until a core is available.

  • Arachne would have to create extra kernel threads which run unmanaged.
  • CorePolicy doesn't know the ThreadIds?
  • When a new core joins the policy, you'd have to search the unmanaged kernel threads and move Arachne threads to cores.
  • Even if we don't get exclusive cores, they can still make progress.

You cannot create more exclusive threads than cores available; other mechanisms add a lot of complexity.
Load estimator needs resources. Need at least one non-exclusive core.

Ensure that Arachne does not yield cores beyond minNumCores, even if mustReleaseCore returns true.

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

No branches or pull requests

1 participant