IP Library › Granted Patent US 11,294,724
Granted Patent B2
US 11,294,724 · App. 16/585,424 · Granted Apr 5, 2022

Shared resource allocation in a multi-threaded microprocessor

Inventors: Kai Troester (Boxborough, MA); Neil Marketkar (Boxborough, MA); Matthew T. Sobel (Boxborough, MA); Srinivas Keshav (Austin, TX)
Assignee: ADVANCED MICRO DEVICES, INC.
G06F9/5038G06F9/4887G06F9/505G06F9/5061
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,294,724
App. No.
16/585,424
Filed
Sep 27, 2019
Granted
Apr 5, 2022
Kind
B2
Art Unit
2196
USPC
718/103
Abstract

An approach is provided for allocating a shared resource to threads in a multi-threaded microprocessor based upon the usefulness of the shared resource to each of the threads. The usefulness of a shared resource to a thread is determined based upon the number of entries in the shared resource that are allocated to the thread and the number of active entries that the thread has in the shared resource. Threads that are allocated a large number of entries in the shared resource and have a small number of active entries in the shared resource, indicative of a low level of parallelism, can operate efficiently with fewer entries in the shared resource, and have their allocation limit in the shared resource reduced.

Claims (40)

1. A multi-threaded microprocessor comprising:

a shared resource having a plurality of entries; and

shared resource logic configured to:

determine:

a number of entries, from the plurality of entries in the shared resource, that are allocated to a thread from a plurality of threads during a first time period, and

a number of active entries for the thread in the shared resource during the first time period,

use the number of entries in the shared resource that are allocated to the thread during the first time period and the number of active entries for the thread in the shared resource during the first time period, to change an allocation limit assigned to the thread for the shared resource for a second time period.

2. The multi-threaded microprocessor as recited in claim 1 , wherein changing the allocation limit assigned to the thread for the shared resource for the second time period includes decreasing the allocation limit assigned to the thread for the shared resource for the second time period.

3. The multi-threaded microprocessor as recited in claim 2 , wherein the allocation limit assigned to the thread for the shared resource for the second time period is decreased by an incremental amount, or to a reduced allocation limit.

4. The multi-threaded microprocessor as recited in claim 1 , wherein the shared resource logic is further configured to:

in response to determining that both the number of entries in the shared resource that are allocated to the thread during the first time period satisfies a first threshold and the number of active entries for the thread in the shared resource during the first time period satisfies a second threshold, decreasing the allocation limit assigned to the thread for the shared resource to the thread for the second time period.

5. The multi-threaded microprocessor as recited in claim 1 , wherein the shared resource logic is further configured to:

determine a usefulness metric for the thread, wherein the usefulness metric is a ratio of the number of active entries for the thread in the shared resource to the number of entries in the shared resource that are allocated to the thread, and

compare the usefulness metric for the thread to a usefulness threshold to determine whether to change the allocation limit for the thread.

6. The multi-threaded microprocessor as recited in claim 5 , wherein the shared resource logic is further configured to:

for each clock cycle of a clock cycle window, determine and compare the usefulness metric for the thread to the usefulness threshold, and

in response to the usefulness metric for the thread not satisfying the usefulness threshold for each clock cycle of the clock cycle window, decreasing the allocation limit for the thread.

7. The multi-threaded microprocessor as recited in claim 5 , wherein the shared resource logic is further configured to change the allocation limit for the thread based upon the usefulness metric for the thread.

8. The multi-threaded microprocessor as recited in claim 1 , wherein changing the allocation limit assigned to the thread for the shared resource for the second time period includes increasing the allocation limit assigned to the thread for the shared resource for the second time period.

9. The multi-threaded microprocessor as recited in claim 8 , wherein increasing the allocation limit assigned to the thread for the shared resource for the second time period includes increasing the allocation limit assigned to the thread for the shared resource for the second time period to a total number of entries available in the shared resource.

10. The multi-threaded microprocessor as recited in claim 1 , wherein the shared resource logic is further configured to:

in response to determining that either the number of entries in the shared resource that are allocated to the thread during the first time period does not satisfy a first threshold or the number of active entries for the thread in the shared resource during the first time period does not satisfy a second threshold, increasing the allocation limit assigned to the thread for the shared resource for the second time period.

11. The multi-threaded microprocessor as recited in claim 10 , wherein values for the first threshold and the second threshold are selected based upon the number of entries in the shared resource that are allocated to the thread during the first time period.

12. The multi-threaded microprocessor as recited in claim 1 , wherein the shared resource logic is further configured to:

in response to determining that either the number of entries in the shared resource that are allocated to the thread during the first time period does not satisfy a first threshold, or the number of active entries for the thread in the shared resource during the first time period does not satisfy a second threshold, increasing the allocation limit assigned to the thread for the shared resource for the second time period.

13. The multi-threaded microprocessor as recited in claim 1 , wherein the number of active entries for the thread in the shared resource during the first time period is a least number of active entries for the thread in the shared resource during the first time period.

14. The multi-threaded microprocessor as recited in claim 1 , wherein prior to the first time period, the thread is assigned an allocation limit that is a total number of available entries in the shared resource.

15. The multi-threaded microprocessor as recited in claim 1 , wherein the shared resource is one or more of a load queue, a register file, or a reservation station.

16. The multi-threaded microprocessor as recited in claim 1 , wherein the first time period is a first clock cycle window and the second time period is a second clock cycle window.

17. A computer-implemented method comprising:

determining, by shared resource logic in a multi-threaded microprocessor having a shared resource with a plurality of entries:

a number of entries, from the plurality of entries in the shared resource, that are allocated to a thread from a plurality of threads during a first time period, and

a number of active entries for the thread in the shared resource during the first time period, and

using, by the shared resource logic, the number of entries in the shared resource that are allocated to the thread during the first time period and the number of active entries for the thread in the shared resource during the first time period, to change an allocation limit assigned to the thread for the shared resource for a second time period.

18. The computer-implemented method as recited in claim 17 , wherein changing the allocation limit assigned to the thread for the shared resource for the second time period includes decreasing the allocation limit assigned to the thread for the shared resource for the second time period.

19. The computer-implemented method as recited in claim 18 , further comprising:

in response to determining, by the shared resource logic, that the number of entries in the shared resource that are allocated to the thread during the first time period satisfies a first threshold and the number of active entries for the thread in the shared resource during the first time period satisfies a second threshold, decreasing the allocation limit assigned to the thread for the shared resource for the second time period.

20. The computer-implemented method as recited in claim 17 , further comprising:

determining a usefulness metric for the thread, wherein the usefulness metric is a ratio of the number of active entries for the thread in the shared resource to the number of entries in the shared resource that are allocated to the thread, and

comparing the usefulness metric for the thread to a usefulness threshold to determine whether to change the allocation limit for the thread.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 27, 2019
From: TROESTER, KAI; MARKETKAR, NEIL; SOBEL, MATTHEW T.; KESHAV, SRINIVAS
To: ADVANCED MICRO DEVICES, INC.
Reel/Frame 050515/0325 →
Continuity (1)
Related Publication 20210096920A1 · Apr 1, 2021