cpuinfo icon indicating copy to clipboard operation
cpuinfo copied to clipboard

[cpuinfo] Add cpuinfo_cluster.is_power_effiecient field

Open digantdesai opened this issue 4 years ago • 1 comments

Summary:

  • For ARM/ARM64, with Linux or Mach: set to true if the first core in the least capable cluster is a little core, for others: set to false (for now)
  • If this is false, then this can be a cluster of big cores, or prime/gold cores
  • Renamed and cleaned up midr_score_core() logic to support this use case without altering its original behavior

Test Plan: Since this only works on ARM for now, tested this in Pixel3a and Pixel5 running android Also ran all mock tests for arm64 using Pixel3a

On Pixel3a -

sargo:/data/local/tmp # ./cpu-info
SoC name: Qualcomm Snapdragon 670
Microarchitectures:
        2x Cortex-A75
        6x Cortex-A55r0
Cores:
        0: 1 processor (0), ARM Cortex-A75
        1: 1 processor (1), ARM Cortex-A75
        2: 1 processor (2), ARM Cortex-A55r0
        3: 1 processor (3), ARM Cortex-A55r0
        4: 1 processor (4), ARM Cortex-A55r0
        5: 1 processor (5), ARM Cortex-A55r0
        6: 1 processor (6), ARM Cortex-A55r0
        7: 1 processor (7), ARM Cortex-A55r0
Logical processors (System ID):
        0 (6)
        1 (7)
        2 (0)
        3 (1)
        4 (2)
        5 (3)
        6 (4)
        7 (5)
Clusters:
         cluster id 0 has 2 x       Cortex-A75 [ ]
         cluster id 1 has 6 x     Cortex-A55r0 [ Power Efficient ]

On Pixel5 -

redfin:/data/local/tmp $ ./cpu-info
SoC name: Unknown
Microarchitectures:
	2x Cortex-A76
	6x Cortex-A55
cores:
	0: 1 processor (0), ARM Cortex-A76
	1: 1 processor (1), ARM Cortex-A76
	2: 1 processor (2), ARM Cortex-A55
	3: 1 processor (3), ARM Cortex-A55
	4: 1 processor (4), ARM Cortex-A55
	5: 1 processor (5), ARM Cortex-A55
	6: 1 processor (6), ARM Cortex-A55
	7: 1 processor (7), ARM Cortex-A55
Logical processors (System ID):
	0 (7)
	1 (6)
	2 (0)
	3 (1)
	4 (2)
	5 (3)
	6 (4)
	7 (5)
clusters:
	 cluster id 0 has 1 x       Cortex-A76 [ ]
	 cluster id 1 has 1 x       Cortex-A76 [ ]
	 cluster id 2 has 6 x       Cortex-A55 [ Power Efficient ]

Reviewers: kimishpatel,dreiss Subscribers: Tags: aarch64 Tasks:

digantdesai avatar Nov 08 '21 21:11 digantdesai

@kimishpatel - FYI

digantdesai avatar Nov 08 '21 21:11 digantdesai