IP Library Granted Patent US 9,086,721
Granted Patent B2
US 9,086,721 · App. 14/157,764 · Granted Jul 21, 2015

Allocating resources to threads based on speculation metric

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 9,086,721
App. No.
14/157,764
Granted
Jul 21, 2015
Kind
B2
Abstract

Methods, reservation stations and processors for allocating resources to a plurality of threads based on the extent to which the instructions associated with each of the threads are speculative. The method comprises receiving a speculation metric for each thread at a reservation station. Each speculation metric represents the extent to which the instructions associated with a particular thread are speculative. The more speculative an instruction, the more likely the instruction has been incorrectly predicted by a branch predictor. The reservation station then allocates functional unit resources (e.g. pipelines) to the threads based on the speculation metrics and selects a number of instructions from one or more of the threads based on the allocation. The selected instructions are then issued to the functional unit resources.

Claims (39)

1. A method of allocating resources between a plurality of threads in a processor, each thread being associated with a plurality of instructions, the method comprising:

receiving, at a reservation station, a speculation metric for each thread of the plurality of threads, each speculation metric representing an extent to which the instructions associated with the thread are speculative;

allocating, at the reservation station, functional unit resources to the plurality of threads based on the speculation metrics, comprising:

comparing the speculation metrics to identify a thread with less speculative instructions;

determining a difference between the speculation metric for the thread with less speculative instructions and a speculation metric for another thread; and

in response to determining the difference exceeds a threshold, allocating additional functional unit resources to the thread with less speculative instructions;

selecting, at the reservation station, instructions associated with the plurality of threads based on the allocation of functional unit resources; and

issuing, at the reservation station, the selected instructions to the functional unit resources.

2. The method according to claim 1 , further comprising:

receiving at a speculation metric calculator confidence values for the plurality of instructions, each confidence value representing the likelihood that a particular instruction has been correctly predicted;

generating at the speculation metric calculator the speculation metrics based on the confidence values; and

providing the speculation metrics from the speculation metric calculator to the reservation station.

3. The method according to claim 2 , wherein generating a speculation metric for a particular thread comprises summing the confidence values for instructions associated with that thread over a predetermined number of cycles.

4. The method according to claim 2 , wherein generating a speculation metric for a particular thread comprises adding a generated confidence value associated with a particular instruction associated with that thread to the speculation metric for that thread and subtracting the confidence value from the speculation metric for that thread once the associated instruction has been executed.

5. The method according to claim 1 , wherein the allocation of functional unit resources is performed once every clock cycle.

6. The method according to claim 1 , wherein the allocation of functional unit resources is performed periodically.

7. The method according to claim 1 , wherein the functional unit resources comprise a plurality of pipelines, and allocating functional unit resources to the plurality of threads comprises allocating none, one or more pipelines to each thread.

8. The method according to claim 7 , wherein selecting instructions associated with the plurality of threads based on the allocation comprises selecting a number of ready instructions from a particular thread, wherein the number of ready instructions is equal to the number of pipelines allocated to the particular thread.

9. The method according to claim 8 , wherein in response to determining the number of instructions selected based on the allocation is less than the number of pipelines, selecting ready instructions from any thread so that the number of selected instructions is equal to the number of pipelines.

10. An apparatus with a reservation station arranged to allocate resources between a plurality of threads, the reservation station comprising:

a plurality of instruction queues, each instruction queue configured to store instructions for one of the plurality of threads; and

an instruction scheduler in communication with the plurality of instruction queues, the instruction scheduler arranged to:

receive a speculation metric for each thread of the plurality of threads, each speculation metric representing an extent to which the instructions associated with the thread are speculative;

allocate functional unit resources to the plurality of threads based on the speculation metrics, comprising:

comparing the speculation metrics to identify a thread with less speculative instructions;

determining a difference between the speculation metric for the thread with less speculative instructions and a speculation metric for another thread; and

in response to determining the difference exceeds a predetermined threshold, allocating additional functional unit resources to the thread with less speculative instructions;

select instructions from the plurality of instruction queues based on the allocation of functional unit resources; and

issue the selected instructions to the functional unit resources for execution.

11. The apparatus according to claim 10 , wherein the allocation of functional unit resources is performed once every clock cycle.

12. The apparatus according to claim 10 , wherein the allocation of functional unit resources is performed periodically.

13. The apparatus according to claim 10 , wherein the functional unit resources comprise a plurality of pipelines, and allocating functional unit resources to the plurality of threads based on the speculation metrics comprises allocating none, one or more of the pipelines to each thread based on the speculation metrics.

14. The apparatus according to claim 13 , wherein selecting instructions from the plurality of instruction queues based on the allocation comprises selecting a number of ready instructions from a particular instruction queue, wherein the number of ready instructions is equal to the number of pipelines allocated to the thread associated with the particular instruction queue.

15. The apparatus according to claim 14 , wherein in response to determining the number of ready instructions selected based on the allocation is less than the number of pipelines, selecting ready instructions from any instruction queue so that the number of selected instructions is equal to the number of pipelines.

16. An apparatus with a speculation metric calculator arranged to calculate a speculation metric for each of a plurality of threads, the speculation metric calculator comprising:

an input module configured to receive confidence values for a plurality of instructions, each instruction associated with a thread of the plurality of threads, each confidence value representing the likelihood that a particular instruction has been correctly predicted; and

a logic unit in communication with the input module, the logic unit configured to generate the speculation metrics based on the confidence values, each speculation metric representing an extent to which instructions associated with the thread are speculative.

17. The apparatus according to claim 16 , wherein the logic unit is configured to generate a speculation metric for a particular thread by a process comprising summing the confidence values for instructions associated with that thread over a predetermined number of cycles.

18. The apparatus according to claim 16 , wherein the logic unit is configured to generate a speculation metric for a particular thread by a process comprising adding a generated confidence value associated with a particular instruction associated with that thread to the speculation metric for that thread and subtracting the confidence value from the speculation metric for that thread once the associated instruction has been executed.

Assignments (8)
RELEASE OF SECURITY INTEREST Recorded Dec 29, 2022
From: CAPITAL FINANCE ADMINISTRATION, LLC, AS ADMINISTRATIVE AGENT
To: MIPS TECH, LLC; WAVE COMPUTING INC.
Reel/Frame 062251/0251 →
SECURITY INTEREST Recorded Jun 14, 2021
From: MIPS TECH, LLC; WAVE COMPUTING, INC.
To: CAPITAL FINANCE ADMINISTRATION, LLC
Reel/Frame 056558/0903 →
RELEASE OF SECURITY INTEREST Recorded Jun 14, 2021
From: WAVE COMPUTING LIQUIDATING TRUST
To: MIPS TECH, INC.; HELLOSOFT, INC.; WAVE COMPUTING (UK) LIMITED; IMAGINATION TECHNOLOGIES, INC.; CAUSTIC GRAPHICS, INC.; MIPS TECH, LLC; WAVE COMPUTING, INC.
Reel/Frame 056589/0606 →
SECURITY INTEREST Recorded Feb 26, 2021
From: WAVE COMPUTING, INC.; MIPS TECH, LLC; MIPS TECH, INC.; HELLOSOFT, INC.; WAVE COMPUTING (UK) LIMITED; IMAGINATION TECHNOLOGIES, INC.; CAUSTIC GRAPHICS, INC.
To: WAVE COMPUTING LIQUIDATING TRUST
Reel/Frame 055429/0532 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 19, 2018
From: MIPS TECH LIMITED
To: MIPS TECH, LLC
Reel/Frame 045593/0166 →
CHANGE OF NAME Recorded Jan 26, 2018
From: HELLOSOFT LIMITED
To: MIPS TECH LIMITED
Reel/Frame 045168/0922 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 24, 2018
From: IMAGINATION TECHNOLOGIES LIMITED
To: HELLOSOFT LIMITED
Reel/Frame 044712/0386 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 17, 2014
From: JACKSON, HUGH; ROWLAND, PAUL
To: IMAGINATION TECHNOLOGIES, LIMITED
Reel/Frame 031993/0328 →