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

OS X Thread Affinity is unimplemented #18

Open
ruby0x1 opened this issue Sep 2, 2015 · 13 comments
Open

OS X Thread Affinity is unimplemented #18

ruby0x1 opened this issue Sep 2, 2015 · 13 comments

Comments

@ruby0x1
Copy link
Contributor

ruby0x1 commented Sep 2, 2015

I've made progress on this and will PR soon with an implementation.

@amesgames
Copy link

Curious: what is the status of this issue? Did it ever get attention?

@RichieSams
Copy link
Owner

RichieSams commented Jan 29, 2018

It's stalled. I haven't heard back from underscorediscovery. That said, my brief look into OSX thread affinity suggests that it's not possible from the kernel level. OSX purposely doesn't allow you to set the affinity.

@ruby0x1
Copy link
Contributor Author

ruby0x1 commented Jan 29, 2018

Hey apparently I slept on this.
here's a post on how http://yyshen.github.io/2015/01/18/binding_threads_to_cores_osx.html

@ruby0x1
Copy link
Contributor Author

ruby0x1 commented Jan 29, 2018

If my local build of this still compiles I can try update and PR for that piece, was there a test (to confirm affinity) in place @RichieSams?

@RichieSams
Copy link
Owner

Not currently, but I could whip one up this week. It would just spin up threads and compare their thread ids to check uniqueness.

@ruby0x1
Copy link
Contributor Author

ruby0x1 commented Jan 29, 2018

@RichieSams that'd be helpful, I think it'd make sure it's consistent on all targets going forward.

@RichieSams
Copy link
Owner

Definitely. Will do

@amesgames
Copy link

Thanks, a ton, you two.

My small team will be experimenting with Fibers and perhaps we can assist with some of the other open issues.

@RichieSams
Copy link
Owner

Awesome!

@RichieSams
Copy link
Owner

Affinity tests for Windows and Linux are implemented: https://github.com/RichieSams/FiberTaskingLib/tree/test_updates

@ruby0x1
Copy link
Contributor Author

ruby0x1 commented Feb 11, 2018

Alright cool, I'll use that as a jumping point.

@RichieSams
Copy link
Owner

OSX Affinity is theoretically implemented. It needs the tests though. And verification that I did it right. I've only tried it on a VM.

@ruby0x1
Copy link
Contributor Author

ruby0x1 commented Feb 11, 2018

ah ok, missed that bit, I'll have a run at it

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

3 participants