Hello, I have had a user report recently from a user using our software on a windows machine that has a high core count, the report is that our software is unable to utilise all of the cores. This is an issue for us only on the windows builds of our software that are done using mingw-w64.
This is because windows has some pretty gross limitations (for legacy reasons) in terms of utilising all threads within a program, to do so it is required to manually assign threads to different 'processor groups' - there is a good write up on it here https://bitsum.com/general/the-64-core-threshold-processor-groups-and-windows/ I started to look into fixing this, but unfortunately mingw-w64 does not expose the calls that would be required to fix this. I noticed that it does wrap other closely related calls e.g. here https://github.com/mingw-w64/mingw-w64/blob/52f2ce12c6182bd239e4f1bbffcd420997b64b08/mingw-w64-libraries/winpthreads/src/thread.c#L706-L727 It seems to me that it should not be difficult to create similar wrappers (for SetThreadGroupAffinity) that wrap the appropriate win32 calls (as the above linked code wraps SetProcessAffinityMask) such that my program (and other peoples programs) can then set the processor groups as required to fully utilise all cores on high core count systems. Before I spend time writing such a wrapper I wanted to get opinions - would the project accept a patch/pull request that adds a wrapper such as this? Is there some other way people would prefer to tackle the problem? Regards, Malcolm _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public