Embodiments of the invention relate to interrupt events handing; more particularly, embodiments of the invention relate to improving performance for events handling.
In a multi-core processor, it may be desirable to control processing cores to use available power headroom to maximize performance. In a situation where not all the processing cores are necessary for processing a particular workload, the cores that are idle are turned off and power is channeled to other cores that are active. The active cores typically transition into a turbo mode by operating at higher frequencies.
Task and event handling algorithms in a multi-core processor are generally pseudo-random and do not consider the impact when a core operates in a turbo mode. Consequently, the overall performance of the system is affected.
Embodiments of the present invention will be understood more fully from the detailed description given below and from the accompanying drawings of various embodiments of the invention, which, however, should not be taken to limit the invention to the specific embodiments, but are for explanation and understanding only.
Embodiments of an apparatus for improving performance for events handling are presented. In one embodiment, the apparatus includes a number of processing elements and task routing logic. If at least one of the processing elements is in a turbo mode, the task routing logic selects a processing element for executing a task based at least on a comparison of performance losses.
In the following description, numerous details are set forth to provide a more thorough explanation of embodiments of the present invention. It will be apparent, however, to one skilled in the art, that embodiments of the present invention may be practiced without these specific details. In other instances, well-known structures and devices are shown in block diagram form, rather than in detail, in order to avoid obscuring embodiments of the present invention.
In other instances, well-known components or methods, such as, for example, microprocessor architecture, virtual machine monitor, power control, clock gating, and operational details of known logic, have not been described in detail in order to avoid unnecessarily obscuring the present invention.
It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise as apparent from the following discussion, it is appreciated that throughout the description, discussions utilizing terms such as “processing” or “computing” or “calculating” or “determining” or “displaying” or the like, refer to the action and processes of a computer system, or similar electronic computing device, that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission or display devices.
Embodiments of present invention also relate to apparatuses for performing the operations herein. Some apparatuses may be specially constructed for the required purposes, or it may comprise a general purpose computer selectively activated or reconfigured by a computer program stored in the computer. Such a computer program may be stored in a computer readable storage medium, such as, but not limited to, any type of disk including floppy disks, optical disks, CD-ROMs, DVD-ROMs, and magnetic-optical disks, read-only memories (ROMs), random access memories (RAMs), EPROMs, EEPROMs, NVRAMs, magnetic or optical cards, or any type of media suitable for storing electronic instructions, and each coupled to a computer system bus.
The method and apparatus described herein are for selecting a processing element for events handing. Specifically, selecting a processing element for events handing is primarily discussed in reference to multi-core processor computer systems. However, methods and apparatuses for selecting a processing element for events handling are not so limited, as they may be implemented on or in association with any integrated circuit device or system, such as cell phones, personal digital assistants, embedded controllers, mobile platforms, desktop platforms, and server platforms, as well as in conjunction with any type of processing element, such as a core, a hardware thread, a software thread, or a logical processor, an accelerator core, or other processing resource. In addition, selecting a processing element for events handling may take place in any hardware/software environment, such as an operating system or a hypervisor executing on hardware.
Embodiments of an apparatus for improving performance for events handling are presented. In one embodiment, the apparatus includes a number of processing elements and task routing logic. If at least one of the processing elements is in a turbo mode, the task routing logic selects a processing element for executing a task based at least on a comparison of performance losses.
In one embodiment, a processing element comprises a thread, a process, a context, a logical processor, a hardware thread, a core, an accelerator core or any processing element, which shares access to other shared resources of processor 160, such as, for example, reservation units, execution units, higher level caches, memory, etc. In one embodiment, a processing element is a thread unit, i.e. an element which is capable of having instructions independently scheduled for execution by a software thread. In one embodiment, a physical processor is an integrated circuit, which includes any number of other processing elements, such as cores or hardware threads.
In one embodiment, a core is logic located on an integrated circuit capable of maintaining an independent architectural state with respect to another core. Each independently maintained architectural state is associated with at least some dedicated execution resources. In one embodiment, a hardware thread is logic located on an integrated circuit capable of maintaining an independent architectural state with respect to another hardware thread. Each independently maintained hardware thread shares access to execution resources. In some embodiments, a core and a hardware thread are used interchangeably. In one embodiment, a core or a hardware thread is also referred to as a processing element.
In one embodiment, a hardware thread, a core, or a processing element is viewed by an operating system or management software as an individual logical processor. Software programs are able to individually schedule operations on each logical processor. Additionally, in some embodiments, each core includes multiple hardware threads for executing multiple software threads.
In one embodiment, a hypervisor (not shown) provides an interface between software (e.g., virtual machines) and hardware resource (e.g., processor 160). In one embodiment, a hypervisor abstracts hardware so that multiple virtual machines run independently in parallel. In one embodiment, a virtual machine provides a software execution environment for a program, such as, for example, a task, a user-level application, guest software, an operating system, another virtual machine, a virtual machine monitor, other executable code, or any combination thereof. In one embodiment, a hypervisor allocates hardware resources (e.g., a core, a hardware thread, a processing element) to different programs.
In one embodiment, a computer system includes input/output (I/O) buffers to transmit and receive signals via interconnect. Examples of the interconnect include a Gunning Transceiver Logic (GTL) bus, a GTL+ bus, a double data rate (DDR) bus, a pumped bus, a differential bus, a cache coherent bus, a point-to-point bus, a multi-drop bus or other known interconnect implementing any known bus protocol.
In one embodiment, a computer system, and in particular, processor 160 supports different power states (e.g., C2-state and C3-state), in accordance with Advanced Configuration and Power Interface (ACPI) specification (see, Advanced Configuration and Power Interface Specification, revision 3.0b, Oct. 10, 2006). In one embodiment, a sleep state (e.g., C2-state and C3-state) is also referred to as an idle state. In one embodiment, a processing element in an idle state is referred to as a sleeping core, an idle core, or a non-active core. In one embodiment, power gates shut off the power supply to an idle processing element. The idle processing element has to be woken up in order to begin executing a program again.
In one embodiment, turbo mode logic 140 controls processing elements 131-134 such that at least one active processing element to operate at a higher frequency if at least another processing element remains idle. Consequently, available power and thermal headroom is utilized by the active processing element to increase or improve the overall performance of the system. In one embodiment, such an operational mode is referred to herein as a turbo mode. When in a turbo mode, turbo mode logic 140 reallocates the power and thermal headroom of one or more idle processing elements to one or more active processing elements to increase the operational frequency of the one or more processing elements that are active.
In one embodiment, a factor that causes a processor to transition to and from a turbo mode (e.g., transitioning to a higher performance level or transitioning to a lower performance level) is referred to herein as an event. In one embodiment, the event is an interrupt event which is re-routable to processing elements 131-134. In one embodiment, processor 160 executes some corresponding task(s) or service(s) in response to the event. In one embodiment, interrupt events come from a device, such as, for example, a disk drive, a network card, and an input/output device.
In one embodiment, performance computing logic 110 calculates performance losses for servicing an event. In one embodiment, processor 160 uses additional time to complete a workload because of executing a task or several tasks in response to the handling the event. In one embodiment, a performance loss is represented as a percentage. For example, if a workload takes 10 ms to execute, a 10% performance loss would cause the workload to take 11.1 ms (i.e., 10 ms/(1-0.10)) to complete.
In one embodiment, task routing logic 130 receives task 101 (as a result of an event) when processor 160 is in a turbo mode. In one embodiment, for example, processing element 131 is in a turbo mode while processing element 132 is in an idle mode. In one embodiment, turbo routing logic 130 selects one of the processing elements based on performance losses associated with selecting among different processing elements (whether an active processing element or a sleeping processing element) to complete task 101.
In one embodiment, a performance loss if an idle processing element is used to execute task 101 is referred to herein as Waking Performance Loss (WPL). In one embodiment, an active processing element (in a turbo mode) transitions to a lower operating frequency so that power is channeled to wake up a sleeping processing element. In one embodiment, performance computing logic determines WPL based on a decrease of an operating frequency associated with the active processing element and a frequency scalability factor of the program being executed by the active processing element. It will be appreciated by those of ordinary skill that other factors and combinations may be used to determine WPL.
In one embodiment, a frequency scalability factor is a ratio at which frequency increase (or decrease) is converted to performance increase (or decrease) for a particular workload. For example, a workload where a 10% increase in an operating frequency results in a 10% increase in performance is equivalent to a scalability factor of 1. For example, a 1% decrease in an operating frequency resulting in a 0.75% performance decrease is equivalent to a scalability factor of 0.75.
In one embodiment, memory 111 stores information about a frequency scalability factor of a program being executed by an active processing element. In one embodiment, memory 111 stores information about the decrease of an operating frequency when an active processing element transitions out from a turbo mode. In one embodiment, such information is collected by monitoring logic (not shown) and includes average history values to predict/estimate current values.
In one embodiment, a performance loss if an active processing element is used to execute task 101 is referred to herein as Active Performance Loss (APL). In one embodiment, performance computing logic 110 determines APL based on an amount of processing time for executing task 101 (in response to the event) and a utilization value associated with the program being executed by the active processing element. In one embodiment, APL is determined based on a processing time for servicing the event divided by a total runtime for the program workload. It will be appreciated by those of ordinary skill that other factors and combinations may be used to determine APL.
In one embodiment, memory 111 stores information about the amount of processing time to process the event. In one embodiment, such information is collected by monitoring logic (not shown) and includes average history values to predict/estimate current values. In one embodiment, the monitor logic also provides a utilization value associated with the program being executed by the active processing element.
In one embodiment, if processor 160 is in a turbo mode, task routing logic 130 determines a processing element to service an event based on a comparison of potential performance losses. In one embodiment, task routing logic 130 determines whether or not processor 160 (or any of processing elements 131-134) is in a turbo mode based on information from turbo mode logic 140.
In one embodiment, if WPL is less than APL, task routing logic 130 selects an idle processing element to service an event. Otherwise, task routing logic 130 sends the event to an active processing element (in a turbo mode).
In one embodiment, processing elements are operable under different sleep states ranging from shallow C-states with smaller exit latencies and modest power savings (e.g., ACPI C1 state) to deep C-states with longer exit latencies and higher power savings (e.g., ACPI C3). Hence, determination of performance losses including WPL and APL are different based on a C-state in which a sleeping core is. In one embodiment, it is more expensive (incurs a higher performance loss) to wake a processing element from a deep C-state than to wake a processing element in a shallow C-state.
Referring to
In one embodiment, processing logic determines whether any of processing elements (of a processor) operates in a turbo mode (process block 210). In one embodiment, processing logic selects any processing element to service the event if there is no processing element operates in a turbo mode (process block 241). In another embodiment, if there is no processing element operates in a turbo mode, processing logic selects a processing element in a power saving mode, for example, a sleeping core, to service the event.
Otherwise, in one embodiment, processing logic determines potential performance losses if any of the processing elements are in a turbo mode.
In one embodiment, processing logic determines a waking performance loss (WPL) where an idle processing element is used to execute the task (process block 220). In one embodiment, processing logic determines WPL based on a decrease of an operating frequency associated with an active processing element and a frequency scalability factor of a program being executed by the active processing element.
In one embodiment, processing logic determines an active performance loss (APL) where an active processing element is used to execute the task (process block 221). In one embodiment, processing logic determines APL based on based on an amount of processing time for executing the task and a utilization value associated with a program being executed by an active processing element.
In one embodiment, processing logic compares WPL with APL (process block 230). In one embodiment, processing logic selects an idle processing element to execute the task if WPL is less than APL (process block 242). Otherwise, processing logic selects an active processing element in a turbo mode to perform the task (process block 243).
Embodiments of the invention may be implemented in a variety of electronic devices and logic circuits. Furthermore, devices or circuits that include embodiments of the invention may be included within a variety of computer systems. Embodiments of the invention may also be included in other computer system topologies and architectures.
Processor 705 may have any number of processing cores. Other embodiments of the invention, however, may be implemented within other devices within the system or distributed throughout the system in hardware, software, or some combination thereof. In one embodiment, processor 705 includes logic similar to components, such as, for example, task routing logic 130 with respect to
Main memory 715 may be implemented in various memory sources, such as dynamic random-access memory (DRAM), hard disk drive (HDD) 720, solid state disk 725 based on NVRAM technology, or a memory source located remotely from the computer system via network interface 730 or via wireless interface 740 containing various storage devices and technologies. The cache memory may be located either within the processor or in close proximity to the processor, such as on the processor's local bus 707. Furthermore, the cache memory may contain relatively fast memory cells, such as a six-transistor (6T) cell, or other memory cell of approximately equal or faster access speed.
Other embodiments of the invention, however, may exist in other circuits, logic units, or devices within the system of
Similarly, at least one embodiment may be implemented within a point-to-point computer system.
The system of
Other embodiments of the invention, however, may exist in other circuits, logic units, or devices within the system of
The invention is not limited to the embodiments described, but can be practiced with modification and alteration within the spirit and scope of the appended claims. For example, it should be appreciated that the present invention is applicable for use with all types of semiconductor integrated circuit (“IC”) chips. Examples of these IC chips include but are not limited to processors, controllers, chipset components, programmable logic arrays (PLA), memory chips, network chips, or the like. Moreover, it should be appreciated that exemplary sizes/models/values/ranges may have been given, although embodiments of the present invention are not limited to the same. As manufacturing techniques (e.g., photolithography) mature over time, it is expected that devices of smaller size could be manufactured.
Whereas many alterations and modifications of the embodiment of the present invention will no doubt become apparent to a person of ordinary skill in the art after having read the foregoing description, it is to be understood that any particular embodiment shown and described by way of illustration is in no way intended to be considered limiting. Therefore, references to details of various embodiments are not intended to limit the scope of the claims which in themselves recite only those features regarded as essential to the invention.
This is a continuation of application Ser. No. 12/630,438, filed on Dec. 3, 2009, entitled “Methods and Apparatuses to Improve Turbo Performance for Events Handling,” and assigned to the corporate assignee of the present invention and incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
Parent | 12630438 | Dec 2009 | US |
Child | 13156268 | US |