[PATCH v2 0/5] ntdll: Improve logical core reporting on Linux and Mac.

Roderick Colenbrander thunderbird2k at gmail.com
Thu Jun 21 00:29:41 CDT 2018


Hi,

This is an updated version of the previous patchset with a few improvements
to unify some of the logic better across Linux and Mac.

The overall issue is that on Linux we report each logical core as a physical
core, so on SMT systems we report twice the number of cores. In addition we
don't properly report SMT capabilities.

The main issues are in the Linux sysfs code for parsing the CPU topology.
We use a common helper function (logical_proc_info_add_by_id) among Linux
and Mac. This is were some of the fixes need to be implemented for not
adding cores twice. (We do something similar in logical_proc_info_add_cache
in relation to parsing shared_cpu_map.)

However we use logical_proc_info_add_by_id in an inconsistent manner between
Linux and Mac code. On Linux we use different ID values (core and package),
but on Mac we re-use the package ID. The early patches rectify this and
thanks Andrew Eikum for helping to test this. The later patches fix the
Linux issues and then add proper SMT reporting flags.

Thanks,
Roderick

Roderick Colenbrander (5):
  ntdll: Derive number of logical CPU cores from core mask.
  ntdll: store core information by core on apple.
  ntdll: Report physical cores once with proper thread mask.
  ntdll: GetLogicalProcessorInformationEx report LTP_PC_SMT for SMT
    cores.
  ntdll: GetLogicalProcessorInformation report LPT_PC_SMT for SMT cores.

 dlls/ntdll/nt.c | 75 +++++++++++++++++++++++++++++++++++++++++++++------------
 include/winnt.h |  2 ++
 2 files changed, 61 insertions(+), 16 deletions(-)

-- 
2.14.4




More information about the wine-devel mailing list