Skip to content

Add support for modular/hybrid processor topology #1571

Closed

Description

@dbwiddis

Intel will soon be releasing new hybrid core / SOC chips. The Apple M1 chip has already been released (with M1X and M2 coming soon).

Windows will soon be updating code defining CPU topology to recognize the new chips, and information is available in the macOS registry to piece it together for Apple silicon. I haven't looked at Linux yet but I expect something in /proc/cpuinfo will probably identify logical processors as high performance or low power.

OSHI should add something to its LogicalProcessor API to permit users to deduce these topology details.

Activity

  1. added
    new feature
    design discussion
    on Mar 16, 2021
  2. pinned this issue on Apr 15, 2021
  3. unpinned this issue on Aug 7, 2021
  4. added this to the milestone on Jan 1, 2022
  5. dbwiddis commented on Jan 13, 2022

    @dbwiddis
    MemberAuthor

    Spent some time trying to scope this out. What I've gathered:

    • Hybrid/modular CPUs all share the same instruction set, but mainly have a difference in performance, with "big" (high computational power) and "little" (low energy consumption) cores.
    • Cores may report different CPUIDs (per Getting Processor ID's for multiple Processors in Windows #1580 although I've read conflicting information about this)
    • With the overall CPUID we can probably identify key modular processors and it comes down to a processor counting game to further specify

    Windows:

    macOS:

    • Currently only need to deal with the M1 family of chips. We can iterate over the IORegistry to identify cores belonging to firestorm or icestorm

    Linux:

    BSD (and possibly all Unix):

    Proposed class: ProcessorCore. The CentralProcessor interface will have a getCores() function that returns a list of these. Class fields:

    • Efficiency Class (taken from windows; higher number means higher performance/less efficiency; current chips just have 0 and 1). Store the Windows value directly. Hardcode macOS values based on "firestorm" and "icestorm".
    • Number of threads (hyperthreading). Just count logical processors. 1 or 2.
    • Identification. Free form string the user has to further parse. For Windows, the CPUID, possibly any other column relevant in WMI. For macOS, the IOReg description of the processor compatibility.

    Any thoughts on anything I'm missing or a better idea on how to do this?

  6. dbwiddis commented on Mar 11, 2022

    @dbwiddis
    MemberAuthor

    GCC Compile farm has an M1 Linux build available so I finally got to test this! Here's 4 "efficiency" and 4 "performance" cores.

     2 physical CPU package(s)
     8 physical CPU core(s)
     8 logical CPU(s)
    Identifier: aarch64 Family 8 Model 0x023 Stepping r0x1p1
    ProcessorID: 6118023100000000
    Microarchitecture: unknown
     Cores:
      0,0: efficiency=459, id=cpu:type:aarch64:feature:,0000,0001,0002,0003,0004,0005,0006,0007,0008,0009,000A,000B,000C,000D,000E,000F,0010,0011,0014,0015,0017,0018,0019,001A,001B,001C,001D,001E,001F,0020,0027,0028
      0,1: efficiency=459, id=cpu:type:aarch64:feature:,0000,0001,0002,0003,0004,0005,0006,0007,0008,0009,000A,000B,000C,000D,000E,000F,0010,0011,0014,0015,0017,0018,0019,001A,001B,001C,001D,001E,001F,0020,0027,0028
      0,2: efficiency=459, id=cpu:type:aarch64:feature:,0000,0001,0002,0003,0004,0005,0006,0007,0008,0009,000A,000B,000C,000D,000E,000F,0010,0011,0014,0015,0017,0018,0019,001A,001B,001C,001D,001E,001F,0020,0027,0028
      0,3: efficiency=459, id=cpu:type:aarch64:feature:,0000,0001,0002,0003,0004,0005,0006,0007,0008,0009,000A,000B,000C,000D,000E,000F,0010,0011,0014,0015,0017,0018,0019,001A,001B,001C,001D,001E,001F,0020,0027,0028
      1,0: efficiency=1024, id=cpu:type:aarch64:feature:,0000,0001,0002,0003,0004,0005,0006,0007,0008,0009,000A,000B,000C,000D,000E,000F,0010,0011,0014,0015,0017,0018,0019,001A,001B,001C,001D,001E,001F,0020,0027,0028
      1,1: efficiency=1024, id=cpu:type:aarch64:feature:,0000,0001,0002,0003,0004,0005,0006,0007,0008,0009,000A,000B,000C,000D,000E,000F,0010,0011,0014,0015,0017,0018,0019,001A,001B,001C,001D,001E,001F,0020,0027,0028
      1,2: efficiency=1024, id=cpu:type:aarch64:feature:,0000,0001,0002,0003,0004,0005,0006,0007,0008,0009,000A,000B,000C,000D,000E,000F,0010,0011,0014,0015,0017,0018,0019,001A,001B,001C,001D,001E,001F,0020,0027,0028
      1,3: efficiency=1024, id=cpu:type:aarch64:feature:,0000,0001,0002,0003,0004,0005,0006,0007,0008,0009,000A,000B,000C,000D,000E,000F,0010,0011,0014,0015,0017,0018,0019,001A,001B,001C,001D,001E,001F,0020,0027,0028
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    design discussionnew feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions