[PATCH 0/3] ntdll: processor info parsing improvements/fixes

Roderick Colenbrander thunderbird2k at gmail.com
Mon Dec 3 00:53:14 CST 2018


Hi,

This patch series was motivated by a bug exposed by earlier logical
core parsing I added this summer (bug 45453).

The fix was simple, but I added a new helper function as more parts of
the code use similar code.

While adding the fix, I noticed how our Linux CPU parsing logic will
really fail on high core count (>32 or >64). These core counts are
becoming more and more common. Consumer AMD Threadripper now has 64
logical cores (maybe >64 next year) and in the server space you can
already easily go above on dual socket systems.

Supporting high core count, doesn't look trivial to me. The CPU parsing
logic is quite fragile as it is. We need to break info better down
into multiple groups (hard coded to 1, right now) based on NUMA nodes.
Wineserver changes likely needed as well for thread affinity.
Many others like needed e.g. the classic GetLogicalProcessorInformation
supposedly reports info just for the "group" the thread is currently assigned
to as it can't handle >32 / >64 cores.

All in all some fun improvements, which warrant a FIXME. For users who
currently go above the limit, we are probably reaching undefined behavior
right now...

Thanks,
Roderick

Roderick Colenbrander (3):
  ntdll: parse sysfs cpu_shared_map using helper function.
  ntdll: Fix parsing thread_siblings bitmaps on high core count systems.
  ntdll: print FIXME on systems supporting more CPU cores than
    supported.

 dlls/ntdll/nt.c | 103 ++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 86 insertions(+), 17 deletions(-)

-- 
2.19.1




More information about the wine-devel mailing list