# US 2019/0317807 A1 · Enforcing central processing unit quality of service guarantees when servicing accelerator requests

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

- Number: US 2019/0317807 A1
- Document ID: US20190317807A1
- Status: Published application
- Kind: A1
- Application number: 15/954,382
- Filed: 2018-04-16
- Published: 2019-10-17
- Earliest claimed: 2018-04-16
- Assignees: Advanced Micro Devices, Inc.
- Applicants: Advanced Micro Devices, Inc.
- Inventors: Arkaprava Basu; Joseph Lee Greathouse
- Web page: https://patentgrep.com/patent/US20190317807A1

## CPC

- G06F 9/4887: {involving deadlines, e.g. rate based, periodic}
- G06F 9/5005: {to service a request}
- G06F 9/466: {Transaction processing}
- G06F 9/48: Program initiating; Program switching, e.g. by interrupt
- G06F 11/3024: {where the computing system component is a central processing unit [CPU]}
- G06F 11/3419: {by assessing time}
- 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 2201/865: Monitoring of software
- 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, apparatuses, and methods for enforcing processor quality of service guarantees when servicing system service requests (SSRs) are disclosed. A system includes a first processor executing an operating system and a second processor executing an application which generates SSRs for the first processor to service. The first processor monitors the number of cycles spent servicing SSRs over a previous time interval, and if this number of cycles is above a threshold, the first processor starts delaying the servicing of subsequent SSRs. In one implementation, if the previous delay was non-zero, the first processor increases the delay used in the servicing of subsequent SSRs. If the number of cycles is less than or equal to the threshold, then the first processor services SSRs without delay. As the delay is increased, the second processor begins to stall and its SSR generation rate falls, reducing the load on the first processor.

## Claims

### Claim 1

A system comprising:
a first processor comprising circuitry configured to execute a plurality of threads of an operating system kernel; and
a second processor coupled to the first processor, wherein the second processor comprises circuitry configured to execute an application and send system service requests to the first processor for servicing;
wherein the first processor is configured to:
monitor a number of cycles that threads executing on the first processor have spent servicing system service requests over a previous time interval; and
dynamically adjust an amount of delay that is added to servicing of a given system service request based on the number of cycles.

### Claim 2 (depends on 1)

The system as recited in claim 1, wherein dynamically adjusting the amount of delay that is added to servicing of the given system service request comprises:
adding a first amount of delay responsive to determining that the number of cycles is greater than a threshold; and
adding a second amount of delay responsive to determining that the number of cycles is less than or equal to the threshold, wherein the second amount of delay is less than the first amount of delay.

### Claim 3 (depends on 2)

The system as recited in claim 2, wherein the circuitry of the first processor is configured to set the first amount of delay to a value greater than a previous amount of delay responsive to the number of cycles being greater than the threshold and the previous amount of delay being greater than zero.

### Claim 4 (depends on 1)

The system as recited in claim 1, wherein dynamically adjusting the amount of delay that is added to servicing of the given system service request comprises:
waiting a first duration prior to initiating servicing of the given system service request responsive to determining that the number of cycles is greater than a threshold; and
waiting a second duration prior to initiating servicing of the given system service request responsive to determining that the number of cycles is less than or equal to the threshold, wherein the second duration is less than the first duration.

### Claim 5 (depends on 4)

The system as recited in claim 4, wherein the threshold is dynamically adjusted by the operating system kernel.

### Claim 6 (depends on 1)

The system as recited in claim 1, wherein the first processor is further configured to:
calculate an overhead associated with servicing system service requests over the previous time interval; and
dynamically adjust an amount of delay that is added to servicing of a given system service request based on the overhead.

### Claim 7 (depends on 1)

The system as recited in claim 1, wherein the circuitry of the first processor is further configured to:
calculate an overhead associated with servicing system service requests over the previous time interval, wherein the overhead comprises one or more of cycles spent servicing system service requests, cycles spent transitioning between user mode and kernel mode, and cycles spent in user mode running at a lower instruction per cycle (IPC) rate; and
dynamically adjust an amount of delay that is added to servicing of a given system service request based on the overhead.

### Claim 8

A method comprising:
monitoring, by a first processor, a number of cycles that threads executing on the first processor have spent servicing system service requests generated by a second processor over a previous time interval; and
dynamically adjusting an amount of delay that is added to servicing of a given system service request based on the number of cycles that threads of the first processor have spent servicing system service requests over the previous time interval.

### Claim 9 (depends on 8)

The method as recited in claim 8, wherein dynamically adjusting the amount of delay that is added to servicing of the given system service request comprises:
adding a first amount of delay responsive to determining that the number of cycles is greater than a threshold; and
adding a second amount of delay responsive to determining that the number of cycles is less than or equal to the threshold, wherein the second amount of delay is less than the first amount of delay.

### Claim 10 (depends on 9)

The method as recited in claim 9, further comprising setting the first amount of delay to a value greater than a previous amount of delay responsive to the number of cycles being greater than the threshold and the previous amount of delay being greater than zero.

### Claim 11 (depends on 8)

The method as recited in claim 8, wherein dynamically adjusting the amount of delay that is added to servicing of the given system service request comprises:
waiting a first duration prior to initiating servicing of the given system service request responsive to determining that the number of cycles is greater than a threshold; and
waiting a second duration prior to initiating servicing of the given system service request responsive to determining that the number of cycles is less than or equal to the threshold, wherein the second duration is less than the first duration.

### Claim 12 (depends on 11)

The method as recited in claim 11, wherein the threshold is set by an operating system kernel.

### Claim 13 (depends on 8)

The method as recited in claim 8, further comprising:
calculating an overhead associated with servicing system service requests over the previous time interval; and
dynamically adjusting an amount of delay that is added to servicing of a given system service request based on the overhead.

### Claim 14 (depends on 8)

The method as recited in claim 8, further comprising:
calculating an overhead associated with servicing system service requests over the previous time interval, wherein the overhead comprises one or more of cycles spent servicing system service requests, cycles spent transitioning between user and kernel mode, and cycles spent in user mode running at a lower instruction per cycle (IPC) rate; and
dynamically adjusting an amount of delay that is added to servicing of a given system service request based on the overhead.

### Claim 15

An apparatus comprising:
a memory;
one or more execution units coupled to the memory;
wherein the apparatus is configured to:
monitor a number of cycles that threads executing on the one or more execution units have spent servicing system service requests over a previous time interval; and
dynamically adjust an amount of delay that is added to servicing of a given system service request based on the number of cycles.

### Claim 16 (depends on 15)

The apparatus as recited in claim 15, wherein dynamically adjusting the amount of delay that is added to servicing of the given system service request comprises:
adding a first amount of delay responsive to determining that the number of cycles is greater than a threshold; and
adding a second amount of delay responsive to determining that the number of cycles is less than or equal to the threshold, wherein the second amount of delay is less than the first amount of delay.

### Claim 17 (depends on 16)

The apparatus as recited in claim 16, wherein the apparatus is further configured to set the first amount of delay to a value greater than a previous amount of delay responsive to the number of cycles being greater than the threshold and the previous amount of delay being greater than zero.

### Claim 18 (depends on 15)

The apparatus as recited in claim 15, wherein dynamically adjusting the amount of delay that is added to servicing of the given system service request comprises:
waiting a first duration prior to initiating servicing of the given system service request responsive to determining that the number of cycles is greater than a threshold; and
waiting a second duration prior to initiating servicing of the given system service request responsive to determining that the number of cycles is less than or equal to the threshold, wherein the second duration is less than the first duration.

### Claim 19 (depends on 18)

The apparatus as recited in claim 18, wherein the threshold is set by the operating system.

### Claim 20 (depends on 15)

The apparatus as recited in claim 15, wherein the the apparatus is further configured to:
calculate an overhead associated with servicing system service requests over the previous time interval; and
dynamically adjust an amount of delay that is added to servicing of a given system service request based on the overhead.
