IP Library › Granted Patent US 8,161,493
Granted Patent B2
US 8,161,493 · App. 12/173,771 · Granted Apr 17, 2012

Weighted-region cycle accounting for multi-threaded processor cores

Assignee: International Business Machines Corporation
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 8,161,493
App. No.
12/173,771
Granted
Apr 17, 2012
Kind
B2
Abstract

An aspect of the present invention improves the accuracy of measuring processor utilization of multi-threaded cores by providing a calibration facility that derives utilization in the context of the overall dynamic operating state of the core by assigning weights to idle threads and assigning weights to run threads, depending on the status of the core. From previous chip designs it has been established in a Simultaneous Multi Thread (SMT) core that not all idle cycles in a hardware thread can be equally converted into useful work. Competition for core resources reduces the conversion efficiency of one thread's idle cycles when any other thread is running on the same core.

Claims (70)

1. A method of measuring usage of a processor operating at a clock cycle, the processor being operable to simultaneously process multiple instructions via at least one thread during a clock cycle, said method comprising:

determining an initial usage for each thread of the at least one thread, each corresponding thread of the at least one thread being in one of a run state wherein the thread therein is executing non-idle code and is using a first amount of processor usage, an idle state wherein the thread therein is executing idle code and is using a second amount of processor usage that is lower than the first amount of processor usage, or a nap state wherein the thread therein is suspended and is using a third amount of processor usage that is lower than the second amount of processor, each instruction on a corresponding thread of the at least one thread additionally being in one of a dispatch state using a fourth amount of processor usage or a non-dispatch state using a fifth amount of processor usage that is lower than the fourth amount of processor usage;

determining whether each thread of the at least one thread is in a run state or an idle state:

multiplying a first weighting factor to the initial usage for each thread determined to be in a run state to generate corresponding fractional run state portions of usage;

multiplying a second weighting factor to the initial usage for each thread determined to be in an idle state to generate corresponding fractional idle state portions of usage;

determining whether each thread in a run state is in a dispatch state or a non-dispatch state;

multiplying a third weighting factor to the initial usage for each thread determined to be in a dispatch state to generate corresponding fractional dispatch state portions of usage; and

multiplying a fourth weighting factor to the initial usage for each thread determined to be in a non-dispatch state to generate corresponding fractional non-dispatch state portions of usage.

2. The method of claim 1 , further comprising:

determining the number of the at least one thread not in a nap state,

wherein said multiplying a first weighting factor to the initial usage for each thread determined to be in a run state to generate corresponding fractional run state portions of usage is based on the number of the at least one thread not in a nap state, and

wherein said multiplying a second weighting factor to the initial usage for each thread determined to be in an idle state to generate corresponding fractional idle state portions of usage is based on the number of the at least one thread not in a nap state.

3. The method of claim 2 , further comprising:

determining the number of the least one thread in a non-dispatch state; and

determining the first weighting factor based on the number of the at least one thread in a non-dispatch state.

4. The method of claim 1 , further comprising:

determining the number of the least one thread in a non-dispatch state; and

determining the first weighting factor based on the number of the at least one thread in a non-dispatch state.

5. The method of claim 1 , further comprising:

determining the number of the at least one thread in a nap state,

wherein said multiplying a first weighting factor to the initial usage for each thread determined to be in a run state to generate corresponding fractional run state portions of usage is based on the number of the at least one thread in a nap state, and

wherein said multiplying a second weighting factor to the initial usage for each thread determined to be in an idle state to generate corresponding fractional idle state portions of usage is based on the number of the at least one thread in a nap state.

6. The method of claim 1 , further comprising:

determining the number of the at least one thread not in a nap state,

wherein said multiplying a first weighting factor to the initial usage for each thread determined to be in a run state to generate corresponding fractional run state portions of usage is based on the number of the at least one thread not in a nap state, and

wherein said multiplying a second weighting factor to the initial usage for each thread determined to be in an idle state to generate corresponding fractional idle state portions of usage is based on the number of the at least one thread not in a nap state.

7. The method of claim 6 , further comprising:

determining the number of the least one thread in a non-dispatch state; and

determining the first weighting factor based on the number of the at least one thread in a non-dispatch state.

8. The method of claim 1 ,

wherein said multiplying a first weighting factor to the initial usage for each thread determined to be in a run state to generate corresponding fractional run state portions of usage comprises multiplying a first weighting factor based on the total number of the at least one thread, and

wherein said multiplying a second weighting factor to the initial usage for each thread determined to be in an idle state to generate corresponding fractional idle state portions of usage comprises multiplying a second weighting factor based on the total number of the at least one thread.

9. The method of claim 1 , further comprising:

monitoring a parameter of the processor; and

changing the first weighting factor to a third weighting factor based on a change in the monitored parameter.

10. A device for use with a processor operating at a clock cycle, the processor being operable to simultaneously process multiple instructions via at least one thread during a clock cycle, said device comprising:

a first portion operable to determine an initial usage for each thread of the at least one thread, each corresponding thread of the at least one thread being in one of a run state wherein the thread therein is executing non-idle code and is using a first amount of processor usage, an idle state wherein the thread therein is executing idle code and is using a second amount of processor usage that is lower than the first amount of processor usage, or a nap state wherein the thread therein is suspended and is using a third amount of processor usage that is lower than the second amount of processor, each instruction on a corresponding thread of the at least one thread additionally being in one of a dispatch state using a fourth amount of processor usage or a non-dispatch state using a fifth amount of processor usage that is lower than the fourth amount of processor usage;

a second portion operable to determine whether each thread of the at least one thread is in a run state or an idle state;

a third portion operable to multiply a first weighting factor to the initial usage for each thread determined to be in a run state to generate corresponding fractional run state portions of usage;

a fourth portion operable to multiply a second weighting factor to the initial usage for each thread determined to be in an idle state to generate corresponding fractional idle state portions of usage;

a fifth portion operable to determine whether each thread in a run state is in a dispatch state or a non-dispatch state;

a sixth portion operable to multiply a third weighting factor to the initial usage for each thread determined to be in a dispatch state to generate corresponding fractional dispatch state portions of usage; and

and a seventh portion operable to multiply a fourth weighting factor to the initial usage for each thread determined to be in a non-dispatch state to generate corresponding fractional non-dispatch state portions of usage.

11. The device of claim 10 , further comprising:

an eighth portion operable to determine the number of the at least one thread not in a nap state,

wherein said third portion is further operable to multiply the first weighting factor to the initial usage for each thread determined to be in a run state to generate corresponding fractional run state portions of usage based on the determined number of the at least one thread not in a nap state, and

wherein said fourth portion is further operable to multiply the second weighting factor to the initial usage for each thread determined to be in an idle state to generate corresponding fractional idle state portions of usage based on the determined number of the at least one thread not in a nap state.

12. The device of claim 11 , further comprising:

a ninth portion operable to determine the number of the least one thread in a non-dispatch state; and

a tenth portion operable to determine the first weighting factor based on the determined number of the at least one thread in a non-dispatch state.

13. The device of claim 10 , further comprising:

an eighth portion operable to determine the number of the least one thread in a non-dispatch state; and

a ninth portion operable to determine the first weighting factor based on the determined number of the at least one thread in a non-dispatch state.

14. The device of claim 10 , further comprising:

an eighth portion operable to determine the number of the at least one thread in a nap state,

wherein said third portion is further operable to multiply the first weighting factor to the initial usage for each thread determined to be in a run state to generate corresponding fractional run state portions of usage based on the determined number of the at least one thread in a nap state, and

wherein said fourth portion is further operable to multiply the second weighting factor to the initial usage for each thread determined to be in an idle state to generate corresponding fractional idle state portions of usage based on the determined number of the at least one thread in a nap state.

15. The device of claim 10 , further comprising:

a fifth portion operable to determine the number of the at least one thread not in a nap state,

wherein said third portion is further operable to multiply the first weighting factor to the initial usage for each thread determined to be in a run state to generate corresponding fractional run state portions of usage based on the determined the number of the at least one thread not in a nap state, and

wherein said fourth portion is further operable to multiply the second weighting factor to the initial usage for each thread determined to be in an idle state to generate corresponding fractional idle state portions of usage based on the determined number of the at least one thread not in a nap state.

16. The device of claim 15 , further comprising:

a sixth portion operable to determine the number of the least one thread in a non-dispatch state; and

a seventh portion operable to determine the first weighting factor based on the determined number of the at least one thread in a non-dispatch state.

17. The device of claim 10 ,

wherein said third portion is further operable to multiply the first weighting factor to the initial usage for each thread determined to be in a run state to generate corresponding fractional run state portions of usage based on the total number of the at least one thread, and

wherein said fourth portion is further operable to multiply the second weighting factor to the initial usage for each thread determined to be in an idle state to generate corresponding fractional idle state portions of usage based on the total number of the at least one thread.

18. The device of claim 10 , further comprising:

a fifth portion operable to monitor a parameter of the processor core; and

sixth portion operable to change the first weighting factor to a third weighting factor based on a change in the monitored parameter.

Assignments (2)
CONFIRMATORY LICENSE Recorded Aug 12, 2009
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: DARPA
Reel/Frame 023088/0256 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 15, 2008
From: FLOYD, MICHAEL S; KUNKEL, STEVEN R; SAWDEY, AARON C; VITALE, PHILIP L
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 021240/0929 →
Continuity (1)
Related Publication 20100287561A1 · Nov 11, 2010