-
Notifications
You must be signed in to change notification settings - Fork 175
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 Windows process binding #78
Comments
Imported from trac issue 77. Created by bgoglin on 2012-06-27T01:54:25, last modified: 2013-03-06T09:21:15 |
Trac comment by bgoglin on 2013-03-06 09:21:15: Won't happen anytime soon, I don't have access to a Windows machine with more than 32 cores. |
The next release will have set/get cpubind support for threads with support for large machines with multiple processor groups (as well as get_last_cpu_location). For process-wide affinity, there's not much hope so far. The only function to move a process to a given group is not public [1]. And process-wide affinity is not equivalent to the sum of affinities of all threads (it contains something like the locality of the original process resources). By the way, that makes hwloc-bind useless on these machines (and we would have to replace execvp with CreateProcess(... INHERIT_PARENT_AFFINITY ...) first, see #151) [1] NtSetInformationProcess() can change the process affinity group+mask as explained in the comments of https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/e0f49cda-4cbf-4da0-918a-0568271edb9f/process-affinity-on-a-system-with-128-processors?forum=wdk |
Microsoft guys pointed me at JobObjects which can apply binding to processes. Unfortunately the API isn't very good either because a process can be in a hierarchy of nested jobs. It's not totally clear which job binding is applied to the process (looks like the first job that applies binding is the only one that will ever be able to change that process binding, other job bindings are not applied). Also querying job binding isn't easy because you don't know which job to query. |
See #471 for more detaisl about why JobObjects are easy to use. |
Hartmut Kaiser (the user who has a 48core windows machine) once said
may I ask you to implement hwloc_get_cpubind() for Windows, please?
We have some support for get_cpubind() but I assume it's not enough for his large machine (use groups too). There are some TODO in the code, we'll need to implement all this and get Hartmut to test them.
The text was updated successfully, but these errors were encountered: