1. Field of the Invention
This invention relates to performance of computer systems and more particularly to performance associated with cache probes.
2. Description of the Related Art
A processing node in a computer system may be placed in any of multiple performance states (or operational states) Pn, where the particular performance state (or P-state) is characterized by an associated voltage and frequency. One factor for determining the appropriate performance state of a node is its utilization. Utilization is the ratio of the time spent by the processing node in the active (execution) state to the overall time interval over which the execution time was tracked or measured. For example, if the overall time interval was 10 milliseconds (ms) and the processor node spent 6 ms in the active (C0) state, then the utilization of the processor node is 6/10=60%. The processor node spends the remaining 4 ms in the idle (non-C0) state where code execution is suspended. A higher node utilization triggers the selection of a higher performance state P higher voltage and frequency to better address performance/watt requirements. Normally the decision to transition the processing node between performance states is made by either the operating system (OS), or high-level software, a driver, or some hardware controller. For example, if the processing node runs at a low performance state resulting in longer code execution time, the system perceives the need for a higher utilization and triggers software or hardware to transition the processing node to a higher performance state where it can complete code execution faster and spend more time in the idle state. That allows increased power savings from an overall better performance per watt. While using utilization as a trigger can provide increased performance per watt in some situations, it fails to address some issues associated with better performance per watt or preventing its degradation.
Accordingly, in one embodiment a method is provided that includes tracking probe activity level in a processing node. The probe activity level is compared to a threshold probe activity level. In an embodiment, if the probe activity level is above the threshold probe activity level, the performance state of the processing node is increased above its current performance level. In an embodiment, if the probe activity level is above the first threshold probe activity level threshold and a predicted idle duration of the processing node is greater than an idle threshold, the cache memory in the processing node is flushed. In an embodiment, after entering the first performance state in response to the probe activity level being above the threshold probe activity level, the processing nodes returns to the lower performance state from which it started in response to a sufficient reduction in probe activity. In an embodiment, the sufficient reduction is to a level that is the first threshold less a hysteresis factor. In embodiments there may be multiple threshold probe activity levels and associated performance states.
In another embodiment, an apparatus includes a probe tracker to track probe activity level in a processing node. The apparatus responds to the probe activity level increasing above a first threshold probe activity level to increase a performance state of the processing node from a current performance state to a first performance state. In an embodiment, the apparatus responds to the probe activity level falling a predetermined level below the first threshold probe activity level to cause the processing node to enter a second performance state lower than the first performance state.
In an embodiment, the probe tracker includes a queue into which probe request is entered and from which a probe request in the queue is retired after the processing node responds to the probe request with at least one of a data movement and a response. In another embodiment, the probe tracker includes a counter having a count value representing probe activity level. The counter increments a count value by a predetermined amount in response to probe activity and decrements the count value by another predetermined amount in response to a passage of a predetermined period of time.
The present invention may be better understood, and its numerous objects, features, and advantages made apparent to those skilled in the art by referencing the accompanying drawings.
Note that the use of the same reference symbols in different drawings indicates similar or identical items.
Referring to
The coherent activity in the responding node does not contribute to increased utilization of the node itself (based on the node's execution stream) since the node can be in the idle state but still respond to probe requests. Additionally, a node's execution stream can be totally independent of probe responses, and therefore coherent activity in a responding node does not lead to a higher execution utilization that normally triggers the increase of the performance state. If a responding node is in a low performance state and is probed by numerous requesting nodes, its probe responding ability (probing bandwidth), which is dependent on the clock frequency of the responding node, may turn into a performance bottleneck and start causing performance loss with respect to application threads running on requesting processing nodes. Accordingly, it is useful to identify scenarios where the probing bandwidth of a responding processing node is insufficient and to address the lack of bandwidth by prompt and controllable transition of the responding node to a higher performance state. Once the burst of probing activity is finished and extra bandwidth is no longer needed, the responding node may be transitioned back to its previous performance state dictated by its execution utilization.
One approach to addressing potential probing response bottlenecks is a software-based solution in those systems where the operating system (OS) or high-level software handling of system devices can properly tune the processor P-state. One software-based solution requires the OS or higher-level software to re-evaluate the processor P-state more frequently (in order to properly respond to a burst of activity) and thus wakes up the processor more frequently for this re-evaluation with any application. This approach likely leads to higher power consumption with an application where such frequent re-evaluation is unnecessary. Making the OS or higher-level behavior more sophisticated and not application-invariant leads to additional overhead in the idle handlers or routines (where P-state re-evaluation happens as a rule) and therefore to a higher power consumption as well. Generally speaking, the granularity of the software-based solution provides no match with a hardware-based approach and is not able to promptly identify both the start of probing activity and the end of probing activity. The latter (end of probing activity) is equally important to identify for power savings, as a processor should not be left in a higher performance state for extra time since that also leads to extra power consumption, which degrades the performance/watt.
Another solution is a hardware-based solution that provides shared voltage/clock planes for all requesting and responding nodes. Such a hardware configuration increases the frequency of the responding node (core) when the requesting node (core) increases its frequency. Slow responses of the responding node will contribute to the increased utilization of the requesting node (core). Thus, software controlling the performance state of the requesting node will increase the performance state of the requesting node, and the responding node performance state will be increased as well (due to the shared frequency and voltage planes), thus eventually increasing the probing bandwidth of the responding core. However, this approach consumes extra power in multi-core processors in situations where applications are running on only a single or a few of the nodes (cores), which is the most typical type of workload in the mobile or ultra-mobile market segments. Further, the software usually fails to respond immediately to the need for a higher clock frequency due to a utilization increase of the requesting node (core), with the time interval typically ranging from a few hundreds of microseconds to milliseconds, which can lead to performance loss over this interval.
Thus, in an embodiment of the invention, each processing node tracks its probing activity. If the level of probing activity exceeds a threshold, the performance state of the processing node is elevated to a minimal performance floor—MinPstateLimit, to address the increased requirement for probing activity bandwidth. After probing activity goes below the threshold minus associated hysteresis, the processing node transitions back to its previous performance state (P-state) in situations where its previous P-state is lower (from the performance standpoint) than the MinPstateLimit. Note that in some embodiments, the hysteresis value may be zero and in other embodiment may be fixed or programmable.
The flowchart of
The embodiment illustrated in
For the P-states, Pm>Pn>Pk. From the performance standpoint, PrbActM>PrbActN>PrbActK. The hysteresis values, HystM, HystN, and HystK may be identical, or may be different for each threshold. The hysteresis values may be configurable, along with the thresholds.
The processing node remains in P-state Pm as long as probing activity remains above (ProbeActivityM-HysteresisM). Once the probing activity drops below (ProbeActivityM-HysteresisM) and if the earlier performance state (before the increase in probe activity) is lower than Pm, the processing node transitions to a lower performance state. Note that the transition to a lower performance state does not happen if the current performance state of the processing node has been increased to Pm or higher by normal flow managed by software (or hardware) based on the processing node utilization factor.
In addition, in an embodiment, the node may transition up to a next higher-level P-state when in P-state Pn 303 or Pk 305 as shown in
An additional aspect in an embodiment is to lower the P-state of the idle node to the minimal P-state if the probing activity is below the threshold. If software or hardware, responsible for utilization-based setting of the P-state of the processing node, has left it in sub-optimally high P-state (higher than MinPstateLimit), the probing P-state control function can lower the node P-state to Pmin (minimal operational P-state) or even to the retention power state so that the node can still respond to the non-bursty or lower level probing activity while saving power. The following describes the transitioning down shown in
Similarly, as shown in
Thus, the control logic will transition the power state up or down based on the current probe activity level to try to match the current power state the probe activity needs. That can help avoid bottlenecks in the responding nodes while still striving to achieve power savings where available.
In another embodiment, the probing activity can trigger the flushing (write-back invalidate and disabling) of the node's caching system when the node is idle and its probing activity exceeds a threshold. That approach may be useful for multi-node systems or for nodes with relatively short cache flushing time. The decision to flush may be based on factors such as probing activity exceeding the threshold (meaning that power consumed by the responding node on the cache probing is getting higher than power associated with flushing the caching system) and node is predicted to remain idle for sufficient time. Approaches to predicting idleness include making predictions based on internal trackers and activity trackers typically in the North-Bridge (or more generally in those parts of the processor integrated circuit (the Uncore), that are not the processor cores, which typically includes such functionality as the memory controller and power management). Additionally, I/O subsystem activity predictions, e.g., interrupts, incoming or outgoing transfers, and timer-ticks, may also be utilized in the prediction of idleness and based in a separate integrated circuit (e.g., the South-Bridge). Additional details on approaches to predicting node idleness have been described, e.g., in NORTH-BRIDGE TO SOUTH-BRIDGE PROTOCOL FOR PLACING PROCESSOR IN LOW POWER STATE, naming Alexander Branover et al. as inventors, application Ser. No. 12/436,439, filed May 6, 2009, which application is incorporated herein by reference in its entirety.
One embodiment for tracking probe activity utilizes a queue structure referred to herein as an In-Flight Queue (IFQ) as shown in
In one embodiment, the node (or wherever the control functionality resides) compares the number of active IFQ entries with a single threshold 502. Note that the control functionality can reside internal or external to the node. If external to the node, it may still reside on the same die in the Uncore portion of the die as described above. If the number of entries exceeds the threshold, the transition to a higher P-state (MinPstateLimit) occurs. After the number of active IFQ entries drops to the level lower than the threshold minus hysteresis, the MinPstateLimit performance floor is cancelled and the processing node is transitioned back to the current P-state where the lower probing bandwidth can be addressed while running at lower power.
Other embodiments may utilize a multi-level IFQ-based approach shown in
In other embodiments, different approaches to tracking probing activity may be used. For example, in systems having hidden, unavailable or a difficult-to-track completion phase for the probing requests, the tracking approach can be predicated on a probe-count mechanism with different increment and decrement rates. For example, referring to
Any new probing request causes counter to increment (CNT=CNT+w_inc) where w_inc is a configurable weight added to the current value of the counter. In some embodiments, the increment/decrement values may be configurable and their settings dependent on customer or higher-level software preference (performance biased, balanced or power biased). For a performance biased setting, w_inc (increment weight) is set to higher value and w_dec (decrement weight) is set to lower value. For a power savings biased setting, these parameters may be set in the opposite way. Also, the IntervalTolerated value may be configurable depending on performance/power preference of the customer or high-level software. The counter value represents the level of probing activity and is compared with ProbeActivity thresholds to figure out an optimal P-state. A higher counter value requires a higher operational P-state in order to match an increased probing bandwidth that the current P-state cannot satisfy.
A low pass filter (LPF) 705 may be used to filter out bursts of probing activity, not properly representing the workload uniformity and leading to the over-increments of the counter and choice of the performance state (P-state) that may be sub-optimal from the performance/watt standpoint. Depending on the particular embodiment, a configurable (from 1 to N) number of probe requests is tracked over configurable interval T. The low pass filter may be designed in different ways to avoid over-counting of the probing requests in case the frequency of their appearance exceeds some configurable limit over time-interval. For example, the low pass filter may be implemented to track no more than n (where 1≦n≦N) probing events over interval T. Thus, if the number of probing events >n, the counter only counts n. The low pass filter supplies the filtered probing requests to the counter.
Alternatively, the low pass filter 705 may be implemented to average the number of probing events over multiple intervals T so that if a particular interval T happens to have a high burst of activity, that high burst is limited by the average over multiple intervals. The average may be implemented, e.g., as a moving average. In one implementation, probe requests are not supplied to the counter at a higher rate than the moving average.
The implementation of the low pass filter may of course influence how the weight w_inc is determined. Thus, for example, if the average over a number of time intervals is utilized, the weight may be scaled to reflect the time interval. In other embodiments, the counter may be supplied directly with probing requests with no filtering.
Aspects of the embodiments herein may be partially implemented in software stored in volatile or non-volatile memory associated with the processor shown in
Note that some of the processes of the present invention may include hardware operating in response to programmed instructions. Alternatively, processes of the present invention may be performed by specific hardware components containing hard-wired logic such as state machines to perform operations or by any combination of programmed data processing components and hardware components. Thus, embodiments of the present invention may include software, data processing hardware, data processing system-implemented methods, and various processing operations, as described herein.
Thus, various embodiments have been described. Note that the description of the invention set forth herein is illustrative, and is not intended to limit the scope of the invention as set forth in the following claims. Variations and modifications of the embodiments disclosed herein may be made based on the description set forth herein, without departing from the scope of the invention as set forth in the following claims.
This application claims the benefit of U.S. provisional application No. 61/258,798, filed Nov. 6, 2009, entitled “Controlling Performance/Power by Frequency Control of the Responding Node,” naming inventors Alexander Branover et al., which application is hereby incorporated by reference.
Number | Date | Country | |
---|---|---|---|
61258798 | Nov 2009 | US |