# US 10,956,220 B2 · Scheduler for amp architecture using a closed loop performance and thermal controller

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,956,220 B2
- Document ID: US10956220B2
- Status: Granted
- Kind: B2
- Application number: 15/870,760
- Filed: 2018-01-12
- Published: 2018-12-06
- Granted: 2021-03-23
- Earliest claimed: 2017-06-04
- Assignees: Apple Inc.
- Applicants: Apple Inc.
- Inventors: Jeremy C. Andrus; John G. Dorsey; James M. Magee; Daniel A. Chimene; Cyril de la Cropte de Chanterac; Bryan R. Hinch; Aditya Venkataraman; Andrei Dorofeev; Nigel R. Gamble; Russell A. Blaine; Constantin Pistol; James S. Ismail
- Web page: https://patentgrep.com/patent/US10956220B2

## CPC

- G06F 9/505: {considering the load}
- G06F 1/206: {comprising thermal management}
- G06F 1/324: by lowering clock frequency
- G06F 1/3243: {Power saving in microcontroller unit}
- G06F 1/329: by task scheduling
- G06F 1/3296: by lowering the supply or operating voltage
- G06F 9/268: {Microinstruction selection not based on processing results, e.g. interrupt, patch, first cycle store, diagnostic programs}
- G06F 9/3851: {from multiple instruction streams, e.g. multistreaming}
- G06F 9/3891: {organised in groups of units sharing resources, e.g. clusters}
- G06F 9/4856: {resumption being on a different machine, e.g. task migration, virtual machine migration (G06F9/5088 takes precedence)}
- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F 9/4893: {taking into account power or heat criteria (power management in computers in general G06F1/3203; thermal management in computers in general G06F1/206)}
- G06F 9/5044: {considering hardware capabilities}
- G06F 9/5094: {where the allocation takes into account power or heat criteria (power management in computers in general G06F1/3203; thermal management in computers in general G06F1/206)}
- G06F 9/54: Interprogram communication
- G06F 1/3206: Monitoring of events, devices or parameters that trigger a change in power modality
- G06F 9/30145: {Instruction analysis, e.g. decoding, instruction word fields}
- G06F 2209/501: Performance criteria
- G06F 2209/5018: Thread allocation
- G06F 2209/509: Offload
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

Systems and methods are disclosed for scheduling threads on a processor that has at least two different core types, such as an asymmetric multiprocessing system. Each core type can run at a plurality of selectable voltage and frequency scaling (DVFS) states. Threads from a plurality of processes can be grouped into thread groups. Execution metrics are accumulated for threads of a thread group and fed into a plurality of tunable controllers for the thread group. A closed loop performance control (CLPC) system determines a control effort for the thread group and maps the control effort to a recommended core type and DVFS state. A closed loop thermal and power management system can limit the control effort determined by the CLPC for a thread group, and limit the power, core type, and DVFS states for the system. Deferred interrupts can be used to increase performance.

## Claims

### Claim 1

A computer-implemented method of limiting a control effort on a system comprising a processor having a first cluster having one or more cores and a second cluster having one or more cores, the method comprising:
determining a control effort limit for the processor;
determining a dynamic voltage and frequency scaling (DVFS) state for at least one of the first cluster or second cluster of cores, using the control effort limit and a power map comprising a plurality of DVFS states for each of the first and second cluster of cores, the power map indexed by the control effort limit;
receiving a recommendation that threads scheduled for execution be run on the at least one of the first or second cluster of cores at a DVFS state different than the DVFS state determined using the control effort limit;
setting the DVFS state of the at least one of the first or second cluster of cores to the DVFS state determined using the control effort limit; and
reducing the control effort limit in response to determining that an average power consumed by the processor for a period of time is greater than an average power target for the processor, wherein the period of time is after determining the average power target, or in response to determining that an average energy dissipated per instruction is greater than a predetermined efficiency threshold for a predetermined period of time.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
determining that a total energy dissipated in the processor for a first predetermined period of time is greater than an instantaneous power target for the processor; and
wherein the control effort limit for the processor is determined at least in part on the total energy dissipated in the processor for the first predetermined period.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
monitoring, by the system, a plurality of power zones within the system, wherein each power zone includes a low pass filter having a target power, a filter method, a time constant, a power delta, and the filter method determines a filtered power for the power zone;
reducing the control effort limit in response to determining that, for a power zone in the plurality of power zones:
at a first time, t0, the filtered power for the power zone was less than the power target for the power zone, less a power delta for the power zone; and
at a second time, t1 that is later than t0, the filtered power for the power zone exceeds the target power for the power zone.

### Claim 4 (depends on 3)

The method of claim 3, further comprising:
continuing to monitor, and determine filtered power for, the power zone that exceeded the target power for the power zone, less the power delta for the power zone; and
continuing to reduce the control effort limit until the filtered power for the power zone tracks the target power for the power zone.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
reducing the control effort limit in response to determining at least one of:
determining that a measured or estimated current limit for the processor is exceeded for a predetermined period of time; and
determining that a number of instructions blocked from execution exceeds a peak throttle rate target for the predetermined period of time, wherein a throttling that blocks the instructions is done by hardware in the system.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
determining a maximum fast die temperature limit for at least one of the first or second cluster of cores; and
determining a maximum control effort for the cluster based at least in part of the maximum fast die temperature and the power map.

### Claim 7 (depends on 6)

The method of claim 6, further comprising:
in response to determining that the control effort limit exceeds the maximum control effort limit, setting the control effort limit to the maximum control effort for the processor.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
masking off one or more cores in at least one of the first cluster of cores or the second cluster of cores, such that the masked off cores do not execute a thread; and
limiting a rate at which masking off of one or more cores can occur.

### Claim 9 (depends on 1)

The method of claim 1, wherein:
the processor comprises an asymmetric processor;
the first cluster of cores comprises a plurality of performance cores (P-cores); and
the second cluster of cores comprises a plurality of efficient cores (E-cores).

### Claim 10

A non-transitory computer-readable medium having executable instructions stored thereon, that when executed by a processing system comprising at least one hardware processor having a first cluster of one or more cores and a second cluster of one or more cores, the at least one hardware processor coupled to a memory to perform operations, the operations comprising:
determining a control effort limit for the processor;
determining a dynamic voltage and frequency scaling (DVFS) state for the first cluster of cores or the second cluster of cores, using the control effort limit and a power map comprising a plurality of DVFS states for each of the first and second cluster of cores, the power map indexed by the control effort limit;
receiving a recommendation that threads scheduled for execution be run on the at least one of the first or second cluster of cores at a DVFS state different than the DVFS state determined using the control effort limit;
setting the DVFS state of the at least one of the first or second cluster of cores to the DVFS state determined using the control effort limit; and
reducing the control effort limit in response to determining that an average power consumed by the processor for a period of time is greater than an average power target for the processor, wherein the period of time is after determining the average power target, or determining that an average energy dissipated per instruction is greater than a predetermined efficiency threshold for a predetermined period of time.

### Claim 11 (depends on 10)

The medium claim 10, further comprising:
determining that a total energy dissipated in the processor for a first predetermined period of time is greater than an instantaneous power target for the processor; and
wherein the control effort limit for the processor is determined at least in part on the total energy dissipated in the processor for the first predetermined period.

### Claim 12 (depends on 10)

The medium of claim 10, further comprising:
monitoring, by the system, a plurality of power zones within the system, wherein each power zone includes a low pass filter having a target power, a filter method, a time constant, a power delta, and the filter method determines a filtered power for the power zone;
reducing the control effort limit in response to determining that, for a power zone in the plurality of power zones:
at a first time, t0, the filtered power for the power zone was less than the power target for the power zone, less the power delta for the power zone; and
at a second time, t1 that is later than t0, the filtered power for the power zone exceeds the target power for the power zone, less the power delta for the power zone.

### Claim 13 (depends on 12)

The medium of claim 12, further comprising:
continuing to monitor, and determine filtered power for, the power zone that exceeded the target power for the power zone, less the power delta for the power zone; and
continuing to reduce the control effort limit until the filtered power for the power zone tracks the target power for the power zone.

### Claim 14 (depends on 10)

The medium of claim 10, further comprising:
reducing the control effort limit in response to determining at least one of:
determining that a measured or estimated current limit for the processor is exceeded for a predetermined period of time; and
determining that a number of instructions blocked from execution exceeds a peak throttle rate target for the predetermined period of time, wherein a throttling that blocks the instructions is done by hardware in the system.

### Claim 15 (depends on 10)

The medium of claim 10, further comprising:
determining a maximum fast die temperature limit for at least one of the first or second cluster of cores; and
determining a maximum control effort for the cluster based at least in part of the maximum fast die temperature and the power map.

### Claim 16 (depends on 15)

The medium of claim 15, further comprising:
in response to determining that the control effort limit exceeds the maximum control effort limit, setting the control effort limit to the maximum control effort for the processor.

### Claim 17 (depends on 10)

The medium of claim 10, further comprising:
masking off one or more cores in at least one of the first cluster of cores or the second clusters of cores, such that the masked off cores do not execute a thread; and
limiting a rate at which masking off of one or more cores can occur.

### Claim 18 (depends on 10)

The medium of claim 10, wherein:
the processor comprises an asymmetric processor;
the first cluster of cores comprises a plurality of performance cores (P-cores); and
the second cluster of cores comprises a plurality of efficient cores (E-cores).

### Claim 19

A system comprising at least one hardware processor having a first cluster of one or more cores and a second cluster of one or more cores, the at least one hardware processor coupled to a memory programmed with executable instructions that, when executed by the at least one hardware processor, perform operations comprising:
determining a control effort limit for the processor;
determining a dynamic voltage and frequency scaling (DVFS) state for at least one of the first cluster of cores or second cluster of cores, using the control effort limit and a power map comprising a plurality of DVFS states for each of the first and second cluster of cores, the power map indexed by the control effort limit;
receiving a recommendation that threads scheduled for execution be run on the at least one of the first or second cluster of cores at a DVFS state different than the DVFS state determined using the control effort limit;
setting the DVFS state of the at least one of the first or second cluster of cores to the DVFS state determined using the control effort limit; and
reducing the control effort limit in response to determining that an average power consumed by the processor for a period of time is greater than an average power target for the processor, wherein the period of time is after determining the average power target, or
determining that an average energy dissipated per instruction is greater than a predetermined efficiency threshold for a predetermined period of time.

### Claim 20 (depends on 19)

The system claim 19, further comprising:
determining that a total energy dissipated in the processor for a first predetermined period of time is greater than an instantaneous power target for the processor; and
wherein the control effort limit for the processor is determined at least in part on the total energy dissipated in the processor for the first predetermined period.

### Claim 21 (depends on 19)

The system of claim 19, further comprising:
monitoring, by the system, a plurality of power zones within the system, wherein each power zone includes a low pass filter having a target power, a filter method, a time constant, a power delta, and the filter method determines a filtered power for the power zone;
reducing the control effort limit in response to determining that, for a power zone in the plurality of power zones:
at a first time, t0, the filtered power for the power zone was less than the power target for the power zone, less the power delta for the power zone; and
at a second time, t1 that is later than t0, the filtered power for the power zone exceeds the target power for the power zone, less the power delta for the power zone.

### Claim 22 (depends on 21)

The system of claim 21, further comprising:
continuing to monitor, and determine filtered power for, the power zone that exceeded the target power for the power zone, less the delta for the power zone; and
continuing to reduce the control effort limit until the filtered power for the power zone tracks the target power for the power zone.

### Claim 23 (depends on 19)

The system of claim 19, further comprising:
reducing the control effort limit in response to determining at least one of:
determining that a measured or estimated current limit for the processor is exceeded for a predetermined period of time; and
determining that a number of instructions blocked from execution exceeds a peak throttle rate target for the predetermined period of time, wherein a throttling that blocks the instructions is done by hardware in the system.

### Claim 24 (depends on 19)

The system of claim 19, further comprising:
determining a maximum fast die temperature limit for at least one of the first or second cluster of cores; and
determining a maximum control effort for the cluster based at least in part of the maximum fast die temperature and the power map.

### Claim 25 (depends on 24)

The system of claim 24, further comprising:
in response to determining that the control effort limit exceeds the maximum control effort limit, setting the control effort limit to the maximum control effort for the processor.

### Claim 26 (depends on 19)

The system of claim 19, further comprising:
masking off one or more cores in at least one of the first cluster of cores or the second clusters of cores, such that the masked off cores do not execute a thread; and
limiting a rate at which masking off of one or more cores can occur.

### Claim 27 (depends on 19)

The system of claim 19, wherein:
the processor comprises an asymmetric processor;
the first cluster of cores comprises a plurality of performance cores (P-cores); and
the second cluster of cores comprises a plurality of efficient cores (E-cores).
