# US 2019/0171460 A1 · Instructions scheduler optimization

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

- Number: US 2019/0171460 A1
- Document ID: US20190171460A1
- Status: Published application
- Kind: A1
- Application number: 15/828,850
- Filed: 2017-12-01
- Published: 2019-06-06
- Earliest claimed: 2017-12-01
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: RAFAEL CAMARDA SILVA FOLCO; Jose F. Santiago Filho; Desnes A. Nunes do Rosário; BRENO H. LEITAO
- Web page: https://patentgrep.com/patent/US20190171460A1

## CPC

- G06F 9/3836: {Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution}
- G06F 9/5088: {involving task migration}
- G06F 9/30145: {Instruction analysis, e.g. decoding, instruction word fields}
- G06F 9/505: {considering the load}
- G06F 11/3003: {Monitoring arrangements specially adapted to the computing system or computing system component being monitored}
- G06F 11/3024: {where the computing system component is a central processing unit [CPU]}
- G06F 11/3433: {for load management (allocation of a server based on load conditions G06F9/505; load rebalancing G06F9/5083; redistributing the load in a network by a load balancer H04L67/1029)}
- G06F 2201/81: Threshold
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In an approach for moving workloads between central processing units (CPUs) to accommodate balance, a processor profiles a first processor and a second processor of a plurality of processors, using a cycle per instruction metric. A processor assigns a first group of instructions to the first processor and a second group of instructions to the second processor. A processor sums an instruction count for the first group of instructions and an instruction count for the second group of instructions. A processor determines that a balance condition, defined by a predetermined threshold, does not exist across the first processor and the second processor. A processor identifies the second processor has a lower cycle per instruction metric than the first processor. A processor moves a workload, running on the first processor, with a maximum number of instructions of an unbalanced group to the second processor to balance workloads.

## Claims

### Claim 1

A method comprising:
profiling a first processor and a second processor of a plurality of processors, using a cycle per instruction metric;
assigning a first group of instructions to the first processor and a second group of instructions to the second processor;
summing an instruction count for the first group of instructions;
summing an instruction count for the second group of instructions;
determining that a balance condition, defined by a predetermined threshold, does not exist across the first processor and the second processor;
in response to the balance condition not existing, identifying the second processor has a lower cycle per instruction metric than the first processor; and
moving a workload, running on the first processor, with a maximum number of instructions of an unbalanced group to the second processor to balance workloads.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
applying a predetermined weight to the first group of instructions and the second group of instructions, according to a number of cycles consumed by each type of instruction.

### Claim 3 (depends on 1)

The method of claim 1, wherein the first processor and the second processor are profiled by reading performance monitoring units registers.

### Claim 4 (depends on 1)

The method of claim 1, wherein the predetermined threshold is a parameter customizable by a scheduler, and wherein the predetermined threshold is expressed as a difference between a maximum ranked group and a minimum ranked group is higher than half of an average of ranked groups.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
prior to moving the workload to the second processor, determining the second processor is currently running an instance of the workload; and
selecting a third processor of the plurality of processors that is next in instruction ranking to become a target processor to receive the workload.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
prior to moving the workload to the second processor, determining an instance of the workload is scheduled to be moved from the second processor; and
selecting a fourth processor of the plurality of processors that is next in instruction ranking to become a target processor to receive the workload.

### Claim 7 (depends on 1)

The method of claim 1, wherein the first group of instructions and the second group of instructions include load store, floating point, integer, vector/scalar, and control.

### Claim 8

A computer program product comprising:
one or more computer readable storage media and program instructions stored on the one or more computer readable storage media, the program instructions comprising:
program instructions to profile a first processor and a second processor of a plurality of processors, using a cycle per instruction metric;
program instructions to assign a first group of instructions to the first processor and a second group of instructions to the second processor;
program instructions to sum an instruction count for the first group of instructions;
program instructions to sum an instruction count for the second group of instructions;
program instructions to determine that a balance condition, defined by a predetermined threshold, does not exist across the first processor and the second processor;
in response to the balance condition not existing, program instructions to identify the second processor has a lower cycle per instruction metric than the first processor; and
program instructions to move a workload, running on the first processor, with a maximum number of instructions of an unbalanced group to the second processor to balance workloads.

### Claim 9 (depends on 8)

The computer program product of claim 8, further comprising:
program instructions, stored on the one or more computer readable storage media, to apply a predetermined weight to the first group of instructions and the second group of instructions, according to a number of cycles consumed by each type of instruction.

### Claim 10 (depends on 8)

The computer program product of claim 8, wherein the first processor and the second processor are profiled by reading performance monitoring units registers.

### Claim 11 (depends on 8)

The computer program product of claim 8, wherein the predetermined threshold is a parameter customizable by a scheduler, and wherein the predetermined threshold is expressed as a difference between a maximum ranked group and a minimum ranked group is higher than half of an average of ranked groups.

### Claim 12 (depends on 8)

The computer program product of claim 8, further comprising:
prior to moving the workload to the second processor, program instructions, stored on the one or more computer readable storage media, to determine the second processor is currently running an instance of the workload; and
program instructions, stored on the one or more computer readable storage media, to select a third processor of the plurality of processors that is next in instruction ranking to become a target processor to receive the workload.

### Claim 13 (depends on 8)

The computer program product of claim 8, further comprising:
prior to moving the workload to the second processor, program instructions, stored on the one or more computer readable storage media, to determine an instance of the workload is scheduled to be moved from the second processor; and
program instructions, stored on the one or more computer readable storage media, to select a fourth processor of the plurality of processors that is next in instruction ranking to become a target processor to receive the workload.

### Claim 14 (depends on 8)

The computer program product of claim 8, wherein the first group of instructions and the second group of instructions include load store, floating point, integer, vector/scalar, and control.

### Claim 15

The computer system comprising:
one or more computer processors, one or more computer readable storage media, and program instructions stored on the one or more computer readable storage media for execution by at least one of the one or more computer processors, the program instructions comprising:
program instructions to profile a first processor and a second processor of a plurality of processors, using a cycle per instruction metric;
program instructions to assign a first group of instructions to the first processor and a second group of instructions to the second processor;
program instructions to sum an instruction count for the first group of instructions;
program instructions to sum an instruction count for the second group of instructions;
program instructions to determine that a balance condition, defined by a predetermined threshold, does not exist across the first processor and the second processor;
in response to the balance condition not existing, program instructions to identify the second processor has a lower cycle per instruction metric than the first processor; and
program instructions to move a workload, running on the first processor, with a maximum number of instructions of an unbalanced group to the second processor to balance workloads.

### Claim 16 (depends on 15)

The computer system of claim 15, further comprising:
program instructions, stored on the one or more computer readable storage media for execution by at least one of the one or more computer processors, to apply a predetermined weight to the first group of instructions and the second group of instructions, according to a number of cycles consumed by each type of instruction.

### Claim 17 (depends on 15)

The computer system of claim 15, wherein the first processor and the second processor are profiled by reading performance monitoring units registers.

### Claim 18 (depends on 15)

The computer system of claim 15, wherein the predetermined threshold is a parameter customizable by a scheduler, and wherein the predetermined threshold is expressed as a difference between a maximum ranked group and a minimum ranked group is higher than half of an average of ranked groups.

### Claim 19 (depends on 15)

The computer system of claim 15, further comprising:
prior to moving the workload to the second processor, program instructions, stored on the one or more computer readable storage media for execution by at least one of the one or more computer processors, to determine the second processor is currently running an instance of the workload; and
program instructions, stored on the one or more computer readable storage media for execution by at least one of the one or more computer processors, to select a third processor of the plurality of processors that is next in instruction ranking to become a target processor to receive the workload.

### Claim 20 (depends on 15)

The computer system of claim 15, further comprising:
prior to moving the workload to the second processor, program instructions, stored on the one or more computer readable storage media for execution by at least one of the one or more computer processors, to determine an instance of the workload is scheduled to be moved from the second processor; and
program instructions, stored on the one or more computer readable storage media for execution by at least one of the one or more computer processors, to select a fourth processor of the plurality of processors that is next in instruction ranking to become a target processor to receive the workload.
