WO2013147895A2 - Réglage du seuil d'utilisation de registre physique dynamique et décrochage à fils croisés dans les processeurs multi-fils - Google Patents

Réglage du seuil d'utilisation de registre physique dynamique et décrochage à fils croisés dans les processeurs multi-fils Download PDF

Info

Publication number
WO2013147895A2
WO2013147895A2 PCT/US2012/031710 US2012031710W WO2013147895A2 WO 2013147895 A2 WO2013147895 A2 WO 2013147895A2 US 2012031710 W US2012031710 W US 2012031710W WO 2013147895 A2 WO2013147895 A2 WO 2013147895A2
Authority
WO
WIPO (PCT)
Prior art keywords
physical register
thread
register use
threshold
logic
Prior art date
Application number
PCT/US2012/031710
Other languages
English (en)
Inventor
James D. Hadley
Srikanth T. Srinivasan
Matthew C. Merten
Ravi Rajwar RAJWAR
David G. LIM
Yury N. ILYIN
Original Assignee
Intel Corporation
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Intel Corporation filed Critical Intel Corporation
Priority to PCT/US2012/031710 priority Critical patent/WO2013147895A2/fr
Publication of WO2013147895A2 publication Critical patent/WO2013147895A2/fr

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3836Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
    • G06F9/3838Dependency mechanisms, e.g. register scoreboarding
    • G06F9/384Register renaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3836Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
    • G06F9/3851Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution from multiple instruction streams, e.g. multistreaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3885Concurrent instruction execution, e.g. pipeline or look ahead using a plurality of independent parallel functional units
    • G06F9/3889Concurrent instruction execution, e.g. pipeline or look ahead using a plurality of independent parallel functional units controlled by multiple instructions, e.g. MIMD, decoupled access or execute
    • G06F9/3891Concurrent instruction execution, e.g. pipeline or look ahead using a plurality of independent parallel functional units controlled by multiple instructions, e.g. MIMD, decoupled access or execute organised in groups of units sharing resources, e.g. clusters
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/504Resource capping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/507Low-level
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • Embodiments relate to processors.
  • embodiments relate to multi-threaded processors that allocate physical registers to logical registers for multiple threads.
  • the multi-threaded processors commonly include multiple sets of hardware and/or logic that are each operable to serve as a logical processor, processing element, or thread to support a software thread (e.g., operating system code, application code, etc.). Different software threads may be performed concurrently by the multiple logical processors, processing elements, or threads.
  • a software thread e.g., operating system code, application code, etc.
  • the threads may share resources, such as, for example, physical registers.
  • the physical registers may be used in conjunction with register renaming to avoid unnecessary serialization of software in order to facilitate concurrent parallel execution of the software by the threads and thereby increase performance.
  • Figure 1 is a block diagram of an embodiment of a multi-threaded processor suitable for implementing embodiments of the invention.
  • Figure 2 is a block diagram of an embodiment of logic of a processor to perform out-of- order physical register allocation.
  • Figure 3 is a block flow diagram of a first embodiment of a method of handling physical register use.
  • Figure 4 is a block flow diagram of a second embodiment of a method of handling physical register use .
  • Figure 5 is a block diagram of an embodiment of an apparatus to handle physical register use.
  • Figure 6 is a block diagram of an embodiment of a thread having separate integer and vector physical register use counters, separate integer and vector higher physical register use thresholds, and separate integer and vector lower physical register use thresholds.
  • Figure 7A is a block diagram illustrating an exemplary in-order pipeline and an exemplary register renaming, out-of-order issue/execution pipeline according to embodiments of the invention.
  • Figure 7B is a block diagram illustrating both an exemplary embodiment of an in-order architecture core and an exemplary register renaming, out-of-order issue/execution architecture core to be included in a processor according to embodiments of the invention.
  • Figure 8A is a block diagram of a single processor core, along with its connection to the on- die interconnect network and with its local subset of the Level 2 (L2) cache, according to embodiments of the invention.
  • L2 Level 2
  • Figure 8B is an expanded view of part of the processor core in Figure 8A according to embodiments of the invention.
  • Figure 9 is a block diagram of a processor that may have more than one core, may have an integrated memory controller, and may have integrated graphics according to embodiments of the invention.
  • Figure 10 shown is a block diagram of a system in accordance with one embodiment of the present invention.
  • Figure 11 shown is a block diagram of a first more specific exemplary system in accordance with an embodiment of the present invention.
  • FIG 12 shown is a block diagram of a second more specific exemplary system in accordance with an embodiment of the present invention.
  • Figure 13 shown is a block diagram of a system on chip in accordance with an embodiment of the present invention.
  • Figure 14 is a block diagram contrasting the use of a software instruction converter to convert binary instructions in a source instruction set to binary instructions in a target instruction set according to embodiments of the invention. Description of the Embodiments
  • a technical problem with known solutions to avoiding a thread stalling due to not enough physical registers being available is that single, static physical register use thresholds are used. These single, static physical register use thresholds do not account for entrance of a thread into a transitory higher physical register use mode.
  • Some embodiments disclosed herein include different physical register use thresholds, namely a higher physical register use threshold for use when threads are not in transitory higher physical register use mode and a lower physical register use threshold when a thread is in a transitory higher physical register use mode.
  • FIG. 1 is a block diagram of an embodiment of a multi-threaded processor 100 suitable for implementing embodiments of the invention.
  • the processor may be a general-purpose processor.
  • the processor may be a general-purpose processor of the type manufactured by Intel Corporation, of Santa Clara, California, although this is not required.
  • the processor may be a special-purpose processor.
  • suitable special-purpose processors include, but are not limited to, network processors, communications processors, cryptographic processors, graphics processors, co-processors, embedded processors, and digital signal processors (DSPs), to name just a few examples.
  • the processor may be any of various complex instruction set computing (CISC) processors, various reduced instruction set computing (RISC) processors, various very long instruction word (VLIW) processors, various hybrids thereof, or other types of processors.
  • the processor may represent a controller (e.g., a microcontroller), or other type of logic circuit capable of processing microcode or microinstructions.
  • the processor includes at least a first core 101.
  • the processor may optionally include at least two cores, namely the first core 101 and a second core 102.
  • the at least two cores may be symmetric cores (e.g., having same configurations, functional units, logic, etc.).
  • the at least two cores may be asymmetric cores (e.g., having different configurations, functional units, and/or logic).
  • one of the cores may be an out-of-order core while the other is an in-order core
  • one of the cores may be a general-purpose core and the other core may be a DSP, the cores may execute different instruction sets, etc.
  • Each core may include one or more logical processors, processing elements, or threads.
  • the logical processors, processing elements, or threads may represent hardware and/or logic to support a software thread (e.g., operating system code, application code, etc.).
  • the logical processors, processing elements, or threads may represent hardware and/or logic that is capable of being independently associated with a software thread. Examples of suitable logical processors, processing elements, or threads include, but are not limited to, a thread unit, a thread slot, a process unit, a context, a context unit, a hardware thread, a core, and/or other hardware and/or logic capable of holding a state, such as an execution state and/or an architectural state.
  • the first core 101 includes a first set of architecture registers 103 A mapped to a first portion of physical registers 109 A and a second set of architecture registers 103B mapped to a second portion of physical registers 109 A.
  • the different sets of architectural registers may allow separate architectural states and/or contexts to be stored. Accordingly, each of the different sets of architecture registers may represent at least a portion of a separate logical processor, processing element, or thread, as described above.
  • Software entities such as an operating system, potentially view the first core as two separate logical processors, processing elements, or threads that are capable of executing two software threads concurrently.
  • the first core may include fewer or more threads.
  • the second core may include one or more additional sets of architectural registers each representing an additional separate thread.
  • a core often refers to logic located on an integrated circuit or die that is capable of maintaining an independent architectural state, in which each independently maintained architectural state is associated with at least some dedicated execution resources.
  • a hardware thread often refers to logic located on an integrated circuit or die that is capable of maintaining an independent architectural state, in which the independently maintained architectural states share access to execution resources. When certain resources are shared and others are dedicated to an architectural state, the distinction between the nomenclature of a core and a hardware thread blurs. Yet often, a core and a hardware thread are viewed by an operating system as individual logical processors or threads, where the operating system is able to individually schedule operations on each logical processor.
  • the illustrated processor includes a few representative types of components commonly found in out-of-order processors.
  • the processor may include additional components (e.g., other types of components found in processors), omit certain of the illustrated components, or a combination thereof.
  • the illustrated processor represents an out- of-order processor, and includes types of components found in out-of-order processors, in another embodiment the processor may be an in-order processor and may omit such components.
  • the various components of multi-threaded processors may be fully shared, shared through partitioning, partly shared, or dedicated to particular threads, depending upon the particular type of component and the particular implementation.
  • the illustrated processor shows one example of a way in which the illustrated components may be shared by, partitioned among, and/or dedicated to the different threads.
  • other embodiments may share, partition, and/or dedicate the various different components or logic differently.
  • the many different ways of sharing, dedicating, and/or partitioning the logic/components as known in the art are typically suitable.
  • the first core includes a first fetch/decode logic 104A dedicated to the first thread or logical processor, and a second fetch/decode logic 104B dedicated to the second thread or logical processor. These may include instruction pointers, decoders, and the like, which are replicated per thread.
  • the first core also includes a first physical register allocation logic 105 A dedicated to the first thread or logical processor, and a second physical register allocation logic 105B dedicated to the second thread or logical processor.
  • a physical register allocation logic may be shared by the first and second threads or logical processors and may switch or alternate between allocating for the threads.
  • the physical register allocation logic may include a register alias table or other logic operable to perform register renaming.
  • Instruction scheduling logic 106 is shared by the first and second threads or logical processors.
  • the instruction scheduling logic may include one or more reservation stations.
  • Execution logic 107 is shared by the first and second threads or logical processors.
  • the execution logic may include one or more arithmetic units, arithmetic logic units, logic units, floating point execution units, integer execution units, jump execution units, load execution units, store execution units, or other types of execution units or functional units known in the arts.
  • Reordering/retirement/rollback logic 108 may be shared by the first and second threads or logical processors, partitioned among the first and second threads or logical processors, or a combination thereof.
  • the reordering/retirement/rollback logic may include a reorder buffer, a retirement unit, a history table, or other known logic to perform instruction reordering and instruction retirement (e.g., in the case of an out-of-order processor).
  • the reorder buffer may hold execution results for instructions executed out of order by the execution logic and the retirement unit may retire the instructions in-order with the results being accessed from the reorder buffer.
  • the rollback logic is included in the event of speculative execution or processing by the processor. Examples of possible speculative execution include, but are not limited to, speculative branch prediction and speculative transactional execution.
  • the processor also includes a set of physical registers 109.
  • a first portion of the physical registers 109A are mapped to the first set of architectural registers 103 A
  • a second portion of the physical registers 109B are mapped to the second set of architectural registers 103B
  • a third portion of the physical registers 109C is unallocated/available and available for speculation.
  • the physical register allocation logic of the processor e.g., the first and second physical register allocation logic 105 A, 105B
  • the physical register allocation logic may include register renaming logic and/or register alias table logic.
  • the allocated physical registers may be used to store execution results associated with the different threads.
  • the physical registers may be mapped to logical registers.
  • the physical register allocation logic may also allocate or reserve resources in the reordering/retirement/rollback logic to hold the results while they are being reordered and/or so that they are available in case a rollback of execution is appropriate (e.g., following a miss-predicated branch, a nuke event, or an aborted transactional execution).
  • the processor also includes an embodiment of dynamic physical register use threshold adjustment logic 110 that is operable to dynamically adjust a physical register use threshold.
  • the dynamic physical register use threshold adjustment logic may dynamically reduce a physical register use threshold (e.g., from a higher threshold to a lower threshold) when one or more threads, logical processors, or processing elements attempt to enter a transitory higher physical register use mode (e.g., attempt to perform hardware based transactional execution, attempt to switch between optimized dynamic binary translation and static compilation, etc.). Dynamic physical register use threshold adjustment logic will be discussed further below.
  • the processor also includes an embodiment of cross thread stall logic 111 that is operable to allow a first thread to stall a second thread.
  • the cross thread stall logic may be operable to allow a first thread, logical processor, or processing element that is attempting to enter a transitory higher physical register use mode to temporarily stall a second thread, logical processor, or processing element when the second threads physical register use value is not within a threshold (e.g., a lower physical register use threshold more appropriate for the transitory higher physical register use mode).
  • the first thread may be prevented from entering the transitory higher physical register use mode while the second threads use value is not within the threshold.
  • the second threads use value will drop to within the threshold, and the first thread will be permitted to enter the transitory higher physical register use mode.
  • the transitory higher physical register use mode may represent hardware based transactional execution. While hardware transactional execution is often used herein as an example of a transitory higher physical register use mode, the scope of the invention is not so limited. Other examples of transitory higher physical register use modes include, but are not limited to, those based on switches between dynamic binary translation and static compilation, swapping in and out sets of architectural registers, switching off threads and/or cores, or the like. Still other transitory higher physical register use modes will be apparent to those skilled in the art and having the benefit of the present disclosure.
  • Figure 2 is a block diagram of an embodiment of processor logic 200 operable to perform out- of-order physical register allocation.
  • Instructions may be provided to fetch/decode logic 204.
  • the instructions may be from one or more threads.
  • the fetch/decode logic may include one or more instruction fetch units and one or more instruction decoders.
  • the fetch/decode logic 204 is coupled with physical register allocation logic 205.
  • the physical register allocation logic may include one or more register renaming units, one or more register alias tables, or similar logic.
  • the physical register allocation logic is coupled with available physical registers tracking logic 214.
  • the available physical registers tracking logic is operable to track physical registers of a set of physical registers (e.g., physical registers 109 in Figure 1), which are available for allocation.
  • the available physical registers tracking logic may include a physical register free list (also referred to simply as a free list) that maintains a list of physical register file (PRF) entry identifiers.
  • PRF physical register file
  • the physical register allocation logic is operable to allocate available physical registers to logical registers used to store pre-commit results for architectural registers specified by instructions of programs.
  • the physical registers generally are not specified by instructions or visible to programmers.
  • Physical register allocation to logical registers (e.g., in conjunction with register renaming) is often used to avoid unnecessary serialization of program operations imposed by the reuse of architectural registers by those program operations.
  • Computer programs often make extensive use of architectural registers in performing desired operations.
  • the physical register allocation logic may store a mapping of logical registers to corresponding physical registers.
  • An instruction scheduling logic 206 is coupled with the physical register allocation logic. Decoded instructions (e.g., microinstructions, micro-operations, etc.) from the decoder, together with their allocated physical registers may be provided to and stored in the instruction scheduling.
  • the instruction scheduling logic may include one or more reservation stations.
  • the instruction scheduling logic is coupled with execution logic 207. The decoded instructions from the instruction scheduling logic , together with their allocated physical registers, may be provided to the execution logic.
  • the execution logic includes out-of-order execution logic to execute decoded instructions out-of-order (i.e., not in original program order), although the scope of the invention is not so limited.
  • the execution logic is coupled with the reordering/retirement/rollback logic 208.
  • Results of execution of the decoded instructions by the execution logic may be provided to and stored or preserved in the reordering/retirement/rollback logic.
  • the physical register allocation logic 205 is also coupled with reordering/retirement/rollback logic 208 and may indicate the allocated physical registers to the reordering/retirement/rollback logic so that the reordering/retirement/rollback logic can keep track of the results of the execution associated with the allocated physical registers.
  • register renaming multiple copies of a single register may be active at different states of commitment and/or speculation at a single point in time.
  • Reordering logic and retirement logic of the logic 208 may reorder and retire instructions which were executed out-of-order back into original program order (i.e., in-order).
  • the committed state of the registers may be updated in a register map that keeps track of the renamed registers.
  • the reordering logic and retirement logic may optionally be omitted.
  • the reordering/retirement/rollback logic may store or preserve the results so that they are available in case a rollback in execution is appropriate.
  • a rollback in execution may be appropriate when a branch miss-prediction has occurred, when a nuke event has occurred, when a speculative transactional execution has been aborted, when it is decided that other speculative execution is to be discarded, etc. That is, the data stored in the reordering/retirement/rollback logic may represent checkpointed information useful to rollback execution to a previous known state.
  • the reordering/retirement/rollback logic may include transactional execution checkpoint logic 213.
  • the transactional execution checkpoint logic may be operable to assist with checkpointing of results of execution associated with speculative transactional execution.
  • this transactional execution checkpoint logic 213 may be used when transactional execution is being performed but may not be used when transactional execution is not being performed.
  • results of execution When results of execution are ready to be committed to architectural state (e.g., the results of the execution are to be stored in architectural registers), physical registers may be reclaimed.
  • a free list may be maintained. When a new physical register is needed, it may be allocated from the free list, and a pointer to the register may be tracked appropriately by the processor.
  • the available physical registers tracking logic 214 is coupled with the reordering/retirement/rollback logic to receive indications of the reclaimed physical registers and is operable to use the information to keep track of the set of available physical registers.
  • the multiple threads or logical processors generally utilize a common set of physical registers.
  • the number of physical registers is fixed/limited. A limited number of physical registers are apportioned among the multiple threads. Commonly each thread needs to have at least a minimum number of physical registers available in order to continue to make forward progress. The particular minimum number of physical registers needed typically depends upon various implementation details (e.g., the particular processor, architecture, pipeline, etc.).
  • this minimum number of physical registers needed may include a number of physical registers sufficient to hold the architectural state and/or execution state of the thread (e.g., the architecturally visible registers, flags, other architectural state of the thread, etc.), a number of physical registers sufficient to get one or more new instructions (e.g., microinstructions) through the pipeline, etc. If the minimum number of physical registers needed is not available for a thread, for example if too many of the physical registers have already been allocated for other hogging threads, then the needy thread may not be able to make forward progress and may stall. This is generally undesirable.
  • physical register allocation to threads may take into account whether or not one or more threads are attempting to enter a transitory higher physical register use mode (e.g., are attempting transactional execution).
  • different (e.g., lower or more restrictive) physical register use thresholds are enforced when at least one thread is attempting to enter such a transitory higher physical register use mode, as compared to when no threads are attempting to enter such a transitory higher physical register use mode.
  • These lower or more restrictive thresholds may reflect that the minimum numbers of physical registers needed for a thread to continue to make forward progress may increase during these transitory higher physical register use modes.
  • the first thread instead of the first thread needing a minimum of 50 physical registers, as in the example above, it may need an additional 20 physical registers due to the transitory higher physical register use mode resulting in a need for a total of 70 physical registers to continue to make forward progress.
  • more physical registers should be left available for allocation among the threads instead of being overly allocated to any given thread, in order to prevent or at least reduce the chances of a thread being stalled and/or not being able to continue to make forward progress due to lack of available physical registers.
  • the transactional execution may involve extended speculative execution than that typically found in out-of-order processors, branch predicting processors (e.g., beyond the depth of a reorder buffer).
  • branch predicting processors e.g., beyond the depth of a reorder buffer.
  • a greater number of results of execution may need to be preserved in the event a rollback of execution is appropriate (e.g., a rollback to a state at the start of the extended speculative execution).
  • the number of results of execution that may need to be preserved may be based on the number of checkpoints of architectural state.
  • Additional execution result storage/preservation logic may be included to supplant the logic commonly used without transactional execution (e.g., reorder buffers, etc.) in order to preserve the execution results associated with the extended speculative execution.
  • this additional execution result storage/preservation logic may be used when transactional execution is performed, but not used when transactional execution is not being performed. Use of this additional logic, in some embodiments, may increase the minimum numbers of physical registers needed for one or more threads to continue to make forward progress. Operating within transactional execution may represent an embodiment of a transitory higher physical register use mode. Not operating in transactional execution may represent a contrasting lower physical register use mode.
  • lower and higher physical register use modes may be encountered when switching between dynamic binary translation and static compilation.
  • a dynamic binary translator may be used to optimize or improve program code being executed by a processor based on dynamic information.
  • more checkpointing type information may need to be preserved due to a more speculative aspect of the dynamic optimizations.
  • a mode in which the dynamic binary translator is being used may represent an embodiment of a higher physical register use mode.
  • it may be desirable to switch from performing dynamic binary translation to performing static compilation For example, this may be the case when the dynamic binary translation and/or the optimizations are not safe, not reliable, or have some other perceived drawback.
  • a switch may be made to a mode in which a static compiled code is used. The performance or other improvements may not be achieved.
  • Lower physical register use may be achieved.
  • a mode in which the static compiler is being used may represent an embodiment of a lower physical register use mode.
  • Figure 3 is a block flow diagram of an embodiment of a method 320 of dynamically reducing a physical register use threshold of a second thread based on a determination that a first thread is attempting to enter a transitory higher physical register use mode, and preventing the first thread from entering the transitory higher physical register use mode based on a determination that a physical register use value of the second thread is not within the reduced physical register use threshold.
  • the transitory higher physical register use mode represents hardware based transactional execution.
  • determining that the first thread is attempting to enter transactional execution may include examining a bit, counter or flag set when transactional execution entrance is attempted, receiving an indication (e.g., from a decoder) that an instruction of the first thread indicates (e.g., has an opcode that indicates) a start of transactional execution.
  • the transitory higher physical register use mode represents a switch between dynamic binary translation and static compilation.
  • a physical register use threshold of the second thread is reduced from a higher physical register use threshold to a lower physical register use threshold, at block 322.
  • the threshold is reduced in response to determining that the first thread is attempting to enter the transitory higher physical register use mode (e.g., attempting to perform transactional execution).
  • the minimum number of physical registers needed to ensure that the threads continue to make forward progress outside of the transitory higher physical register use mode may be insufficient to ensure that the threads make forward progress when the first thread enters the transitory higher physical register use mode. Accordingly, to help safeguard against unforeseen stalls, the lower physical register use thresholds may be set and used.
  • the terms “lower physical register use threshold” and “higher physical register use threshold” are relative terms (i.e., relative to one another), not absolute terms. In other words, the lower threshold is lower than the higher threshold. As one particular example, reducing the threshold may be by an amount between about 10 to about 30, or from about 15 to about 25, physical registers, although the scope of the invention is not so limited.
  • the physical register use value may be a counter value from physical register use counter of the second thread.
  • each thread may have a physical register use counter that counts a number of physical registers that particular thread is using.
  • a value "within" a threshold encompasses the value being less than the threshold, the value being less than or equal to the threshold, the value being not greater than the threshold, etc., depending upon how the threshold is used in the particular implementation.
  • the first thread is prevented from entering the transitory higher physical register use mode (e.g., performing the transactional execution), at block 324.
  • the first thread is prevented from entering the transitory higher physical register use mode while the physical register use value of the second thread is not within the lower physical register use threshold.
  • preventing the first thread from entering the transitory higher physical register use mode may include temporarily stalling the first thread so long as the use value is not within the lower threshold.
  • preventing the first thread from entering the transitory higher physical register use mode, while the physical register use value of the second thread is not within the lower physical register use threshold may help to prevent, or at least reduce the likelihood of, the first thread stalling.
  • the lower physical register use thresholds may take into account a change to the minimum number of physical registers needed to ensure that the first thread continues to make forward progress when the first thread is operating in the transitory higher physical register use mode, which may be different than when it is not.
  • Allocation of additional physical registers to the second thread is optionally prevented, at block 325.
  • the second thread may be stalled at allocation.
  • allocation of additional physical registers to the second thread is prevented while the physical register use value of the second thread is not within the lower physical register use threshold and so long as the first thread is still attempting to enter the transitory higher physical register use mode.
  • instructions of the second thread are allowed to commit and free physical registers so that the physical register use value of the second thread may decrease (e.g., decrease to within the lower threshold).
  • such preventing of allocation may represent an embodiment of a cross- thread stall in which the first thread stalls the second thread temporarily while the use value of the second thread is allowed to reduce to below the lower threshold so that the first thread can safely enter the transitory higher physical register use mode with less risk of stalling due to physical register starvation.
  • a thread attempting to perform transactional execution may stall the other thread whose use value is at a level where there is a risk of physical register starvation if the first thread enters transactional execution.
  • the use value of the cross stalled thread quickly decreases below the lower threshold.
  • a brief cross thread stall generally allows the first thread to again attempt to perform the transactional execution within a brief period of time, and since the use value is now within the threshold be allowed to perform the transactional execution now under conditions in which enough physical registers are available to avoid a more serious stall due to lack of physical registers.
  • the first thread may be determined to increase the physical register use threshold back to the higher physical register use threshold, and then allow allocation of physical registers so long as the use value is within the higher threshold.
  • the first thread may merely be prevented from entering the transitory higher physical register use mode during times when the use value of the second thread is not within the lower threshold.
  • the method may loop back to block 321. Another option, in one embodiment, is to operate at the low threshold all the time (whether or not any thread is doing transactional execution or operating in a transitory higher physical register use mode), although this may tend to reduce performance.
  • Figure 4 is a block flow diagram of a detailed embodiment of a method 440 of dynamically adjusting physical register use thresholds of threads based on whether or not a thread is attempting to perform transactional execution, and preventing the thread from performing the transactional execution when a physical register use value is not within a physical register use threshold. While the method is illustrated for transactional execution, it also applies more generally to other types of transitory higher physical register use modes.
  • Physical register use thresholds for each of a plurality of threads are optionally initialized to higher physical register use thresholds, at block 421. This is optional not required.
  • a determination is made whether any of the threads are attempting to perform a transactional execution, at block 442. If none of the threads are attempting to perform the transactional execution (i.e., "no" is the determination at block 442), then the method advances to block 443.
  • the physical register use thresholds for the threads are set to the higher physical register use thresholds.
  • the method advances to block 447.
  • the physical register use thresholds for one or more other threads, which are not attempting to perform the transactional execution are set to lower physical register use thresholds. For example, if a first thread is attempting to perform a transactional execution, then a physical register use threshold of a second thread may be reduced from a higher physical register use threshold to a lower physical register use threshold.
  • the physical register use values may be counter values from physical register use counters. If the physical register use value(s) of the other thread(s) are all within the lower physical register use threshold(s) (i.e., "yes" is the determination at block 448), then the method advances to block 449. At block 449, the thread attempting to perform the transactional execution is allowed to perform the transactional execution. At block 450, physical register allocation to the plurality of threads is allowed. In some embodiments, the method advances from block 450 to block 442.
  • this may help to prevent, or at least reduce the likelihood of, one or more threads stalling and/or a thread not in transactional execution stalling a thread in transactional execution.
  • a load lock operation of the thread in transactional execution may set a lock in progress bit when the load lock operation retires.
  • Another thread not in transactional execution may attempt a load lock operation at retirement, but may stall on the lock in progress bit set by the thread in transactional execution.
  • the lock in progress bit can be reset only when the store unlock operation of the thread in transactional execution retires.
  • this store unlock operation may not be able to retire because the thread in transactional execution may be stalled at allocation due to insufficient physical registers to maintain forward progress.
  • the reason for the allocation stall of the thread in transactional execution could be that the other thread not in transactional execution may be hogging an inappropriately high number of physical registers. Since the load lock operation of the other thread not in transactional execution is unable to retire because of being blocked by the lock in progress bit, this inhibits freeing of physical registers. In this case, both threads may become stalled and not necessarily for a short period of time.
  • physical register allocation to the thread(s) whose physical register use value(s) are not within the lower physical register use threshold(s) may optionally be prevented, while allowing instructions of the thread(s) to retire or commit, although this is not required. Allowing the instructions of the thread(s) to retire or commit helps to free the physical registers and reduce the physical register use value(s) for the thread(s).
  • the physical register use value(s) for those thread(s) will continue to decrease, as instructions from those thread(s) retire or commit, until the value(s) are within the lower thresholds.
  • the thread that had attempted to perform the transactional execution may retry the transaction execution and be permitted to perform the transactional execution (e.g., in a subsequent determination at block 448).
  • the thread attempting to perform the transactional execution may merely be prevented from performing the transactional execution, while the physical register use value(s) are not within the lower physical register use threshold(s), rather than preventing physical register allocation to the thread(s) whose value(s) are not within the lower threshold(s).
  • the method advances from block 452 to block 442.
  • FIG. 5 is a block diagram of an embodiment of an apparatus 500 to handle physical register use.
  • the apparatus may be included in a multi-threaded processor.
  • the apparatus includes a first thread 503A and a second thread 503B.
  • the first thread attempts to enter a transitory higher physical register use mode (e.g., to perform hardware based transactional execution).
  • the first thread is coupled with a status 572.
  • the status may represent a bit, a counter, a flag, or other logic or state that may be altered (e.g., a bit may be set) to indicate that the first thread is attempting to enter a transitory higher physical register use mode.
  • Threshold adjustment logic 570 is operable to observe, or be informed, that the first thread is attempting to enter the transitory higher physical register use mode. As shown, in one embodiment, the threshold adjustment logic may be coupled with the status 572 and may monitor alteration of the status as an indication of whether or not the first thread is attempting to enter the transitory higher physical register use mode. The threshold adjustment logic is operable to reduce a physical register use threshold 569 of the second thread from a higher physical register use threshold 567 to a lower physical register use threshold 568 in response to the first thread is attempting to enter the transitory higher physical register use mode.
  • Threshold comparison logic 571 is coupled with the physical register use threshold 569.
  • the threshold comparison logic is also coupled with a physical register use counter 565 of the second thread.
  • the threshold comparison logic is operable to determine that a physical register use value of the second thread, for example a counter value of the physical register use counter of the second thread, is not within the lower physical register use threshold.
  • the first thread includes first thread stall logic 574.
  • the threshold comparison logic 571 is coupled with the first thread stall logic.
  • the threshold comparison logic is operable to stall the first thread through the first thread stall logic.
  • the first thread stall logic represents an embodiment of prevention logic that is operable to prevent the first thread from entering the transitory higher physical register use mode, while the physical register use value of the second thread is not within the lower physical register use threshold.
  • the threshold comparison logic 571 may also stall the second thread.
  • the second thread includes second thread stall logic 573.
  • the threshold comparison logic is coupled with the second thread stall logic and is operable to stall the second thread while the physical register use value of the second thread is not within the lower physical register use threshold, and while allowing instructions of the second thread to commit.
  • Such a stall represents an embodiment of a cross thread stall as described elsewhere herein.
  • Figure 6 is a block diagram of a thread 603 having separate integer and vector physical register use counters 6651, 665V, separate integer and vector higher physical register use thresholds 6671, 667V, and separate integer and vector lower physical register use thresholds 6681, 668V.
  • Such separate counters and thresholds may be appropriate, for example, when one set of physical registers is dedicated to integer registers and another set of physical registers is dedicated to vector registers.
  • a set of physical registers may be shared by integer and vector registers.
  • a combined integer and vector physical register use counter, a combined integer and vector higher physical register use threshold, and a combined integer and vector lower physical register use threshold may be used.
  • Processor cores may be implemented in different ways, for different purposes, and in different processors.
  • implementations of such cores may include: 1) a general purpose in-order core intended for general-purpose computing; 2) a high performance general purpose out-of-order core intended for general-purpose computing; 3) a special purpose core intended primarily for graphics and/or scientific (throughput) computing.
  • Implementations of different processors may include: 1) a CPU including one or more general purpose in-order cores intended for general- purpose computing and/or one or more general purpose out-of-order cores intended for general- purpose computing; and 2) a coprocessor including one or more special purpose cores intended primarily for graphics and/or scientific (throughput).
  • Such different processors lead to different computer system architectures, which may include: 1) the coprocessor on a separate chip from the CPU; 2) the coprocessor on a separate die in the same package as a CPU; 3) the coprocessor on the same die as a CPU (in which case, such a coprocessor is sometimes referred to as special purpose logic, such as integrated graphics and/or scientific (throughput) logic, or as special purpose cores); and 4) a system on a chip that may include on the same die the described CPU (sometimes referred to as the application core(s) or application processor(s)), the above described coprocessor, and additional functionality.
  • Exemplary core architectures are described next, followed by descriptions of exemplary processors and computer architectures.
  • Figure 7A is a block diagram illustrating both an exemplary in-order pipeline and an exemplary register renaming, out-of-order issue/execution pipeline according to embodiments of the invention.
  • Figure 7B is a block diagram illustrating both an exemplary embodiment of an in-order architecture core and an exemplary register renaming, out-of-order issue/execution architecture core to be included in a processor according to embodiments of the invention.
  • the solid lined boxes in Figures 7A-B illustrate the in-order pipeline and in-order core, while the optional addition of the dashed lined boxes illustrates the register renaming, out-of-order issue/execution pipeline and core. Given that the in-order aspect is a subset of the out-of-order aspect, the out-of-order aspect will be described.
  • a processor pipeline 700 includes a fetch stage 702, a length decode stage 704, a decode stage 706, an allocation stage 708, a renaming stage 710, a scheduling (also known as a dispatch or issue) stage 712, a register read/memory read stage 714, an execute stage 716, a write back/memory write stage 718, an exception handling stage 722, and a commit stage 724.
  • Figure 7B shows processor core 790 including a front end unit 730 coupled to an execution engine unit 750, and both are coupled to a memory unit 770.
  • the core 790 may be a reduced instruction set computing (RISC) core, a complex instruction set computing (CISC) core, a very long instruction word (VLIW) core, or a hybrid or alternative core type.
  • the core 790 may be a special-purpose core, such as, for example, a network or communication core, compression engine, coprocessor core, general purpose computing graphics processing unit (GPGPU) core, graphics core, or the like.
  • GPGPU general purpose computing graphics processing unit
  • the front end unit 730 includes a branch prediction unit 732 coupled to an instruction cache unit 734, which is coupled to an instruction translation lookaside buffer (TLB) 736, which is coupled to an instruction fetch unit 738, which is coupled to a decode unit 740.
  • the decode unit 740 (or decoder) may decode instructions, and generate as an output one or more micro-operations, micro-code entry points, microinstructions, other instructions, or other control signals, which are decoded from, or which otherwise reflect, or are derived from, the original instructions.
  • the decode unit 740 may be implemented using various different mechanisms.
  • the core 790 includes a microcode ROM or other medium that stores microcode for certain macroinstructions (e.g., in decode unit 740 or otherwise within the front end unit 730).
  • the decode unit 740 is coupled to a rename/allocator unit 752 in the execution engine unit 750.
  • the execution engine unit 750 includes the rename/allocator unit 752 coupled to a retirement unit 754 and a set of one or more scheduler unit(s) 756.
  • the scheduler unit(s) 756 represents any number of different schedulers, including reservations stations, central instruction window, etc.
  • the scheduler unit(s) 756 is coupled to the physical register file(s) unit(s) 758.
  • Each of the physical register file(s) units 758 represents one or more physical register files, different ones of which store one or more different data types, such as scalar integer, scalar floating point, packed integer, packed floating point, vector integer, vector floating point,, status (e.g., an instruction pointer that is the address of the next instruction to be executed), etc.
  • the physical register file(s) unit 758 comprises a vector registers unit, a write mask registers unit, and a scalar registers unit.
  • register units may provide architectural vector registers, vector mask registers, and general purpose registers.
  • the physical register file(s) unit(s) 758 is overlapped by the retirement unit 754 to illustrate various ways in which register renaming and out-of-order execution may be implemented (e.g., using a reorder buffer(s) and a retirement register file(s); using a future file(s), a history buffer(s), and a retirement register file(s); using a register maps and a pool of registers; etc.).
  • the retirement unit 754 and the physical register file(s) unit(s) 758 are coupled to the execution cluster(s) 760.
  • the execution cluster(s) 760 includes a set of one or more execution units 762 and a set of one or more memory access units 764.
  • the execution units 762 may perform various operations (e.g., shifts, addition, subtraction, multiplication) and on various types of data (e.g., scalar floating point, packed integer, packed floating point, vector integer, vector floating point). While some embodiments may include a number of execution units dedicated to specific functions or sets of functions, other embodiments may include only one execution unit or multiple execution units that all perform all functions.
  • the scheduler unit(s) 756, physical register file(s) unit(s) 758, and execution cluster(s) 760 are shown as being possibly plural because certain embodiments create separate pipelines for certain types of data/operations (e.g., a scalar integer pipeline, a scalar floating point/packed integer/packed floating point/vector integer/vector floating point pipeline, and/or a memory access pipeline that each have their own scheduler unit, physical register file(s) unit, and/or execution cluster - and in the case of a separate memory access pipeline, certain embodiments are implemented in which only the execution cluster of this pipeline has the memory access unit(s) 764).
  • a scalar integer pipeline e.g., a scalar floating point/packed integer/packed floating point/vector integer/vector floating point pipeline, and/or a memory access pipeline that each have their own scheduler unit, physical register file(s) unit, and/or execution cluster - and in the case of a separate memory access pipeline, certain embodiments are implemented in
  • the set of memory access units 764 is coupled to the memory unit 770, which includes a data TLB unit 772 coupled to a data cache unit 774 coupled to a level 2 (L2) cache unit 776.
  • the memory access units 764 may include a load unit, a store address unit, and a store data unit, each of which is coupled to the data TLB unit 772 in the memory unit 770.
  • the instruction cache unit 734 is further coupled to a level 2 (L2) cache unit 776 in the memory unit 770.
  • the L2 cache unit 776 is coupled to one or more other levels of cache and eventually to a main memory.
  • the exemplary register renaming, out-of-order issue/execution core architecture may implement the pipeline 700 as follows: 1) the instruction fetch 738 performs the fetch and length decoding stages 702 and 704; 2) the decode unit 740 performs the decode stage 706; 3) the rename/allocator unit 752 performs the allocation stage 708 and renaming stage 710; 4) the scheduler unit(s) 756 performs the schedule stage 712; 5) the physical register file(s) unit(s) 758 and the memory unit 770 perform the register read/memory read stage 714; the execution cluster 760 perform the execute stage 716; 6) the memory unit 770 and the physical register file(s) unit(s) 758 perform the write back/memory write stage 718; 7) various units may be involved in the exception handling stage 722; and 8) the retirement unit 754 and the physical register file(s) unit(s) 758 perform the commit stage 724.
  • the core 790 may support one or more instructions sets (e.g., the x86 instruction set (with some extensions that have been added with newer versions); the MIPS instruction set of MIPS Technologies of Sunnyvale, CA; the ARM instruction set (with optional additional extensions such as NEON) of ARM Holdings of Sunnyvale, CA), including the instruction(s) described herein.
  • the core 790 includes logic to support a packed data instruction set extension (e.g., AVX1, AVX2), thereby allowing the operations used by many multimedia applications to be performed using packed data.
  • a packed data instruction set extension e.g., AVX1, AVX2
  • the core may support multithreading (executing two or more parallel sets of operations or threads), and may do so in a variety of ways including time sliced multithreading, simultaneous multithreading (where a single physical core provides a logical core for each of the threads that physical core is simultaneously multithreading), or a combination thereof (e.g., time sliced fetching and decoding and simultaneous multithreading thereafter such as in the Intel® Hyperthreading technology). While register renaming is described in the context of out-of-order execution, it should be understood that register renaming may be used in an in-order architecture.
  • processors 734/774 and a shared L2 cache unit 776 alternative embodiments may have a single internal cache for both instructions and data, such as, for example, a Level 1 (LI) internal cache, or multiple levels of internal cache.
  • system may include a combination of an internal cache and an external cache that is external to the core and/or the processor. Alternatively, all of the cache may be external to the core and/or the processor.
  • Figures 8A-B illustrate a block diagram of a more specific exemplary in-order core architecture, which core would be one of several logic blocks (including other cores of the same type and/or different types) in a chip.
  • the logic blocks communicate through a high-bandwidth interconnect network (e.g., a ring network) with some fixed function logic, memory I/O interfaces, and other necessary I/O logic, depending on the application.
  • a high-bandwidth interconnect network e.g., a ring network
  • Figure 8A is a block diagram of a single processor core, along with its connection to the on- die interconnect network 802 and with its local subset of the Level 2 (L2) cache 804, according to embodiments of the invention.
  • an instruction decoder 800 supports the x86 instruction set with a packed data instruction set extension.
  • An LI cache 806 allows low-latency accesses to cache memory into the scalar and vector units.
  • a scalar unit 808 and a vector unit 810 use separate register sets (respectively, scalar registers 812 and vector registers 814) and data transferred between them is written to memory and then read back in from a level 1 (LI) cache 806, alternative embodiments of the invention may use a different approach (e.g., use a single register set or include a communication path that allow data to be transferred between the two register files without being written and read back).
  • LI level 1
  • the local subset of the L2 cache 804 is part of a global L2 cache that is divided into separate local subsets, one per processor core. Each processor core has a direct access path to its own local subset of the L2 cache 804. Data read by a processor core is stored in its L2 cache subset 804 and can be accessed quickly, in parallel with other processor cores accessing their own local L2 cache subsets. Data written by a processor core is stored in its own L2 cache subset 804 and is flushed from other subsets, if necessary.
  • the ring network ensures coherency for shared data. The ring network is bi-directional to allow agents such as processor cores, L2 caches and other logic blocks to communicate with each other within the chip. Each ring data-path is 1012-bits wide per direction.
  • Figure 8B is an expanded view of part of the processor core in Figure 8A according to embodiments of the invention.
  • Figure 8B includes an LI data cache 806A part of the LI cache 804, as well as more detail regarding the vector unit 810 and the vector registers 814.
  • the vector unit 810 is a 16-wide vector processing unit (VPU) (see the 16-wide ALU 828), which executes one or more of integer, single-precision float, and double-precision float instructions.
  • the VPU supports swizzling the register inputs with swizzle unit 820, numeric conversion with numeric convert units 822A-B, and replication with replication unit 824 on the memory input.
  • Write mask registers 826 allow predicating resulting vector writes.
  • Figure 9 is a block diagram of a processor 900 that may have more than one core, may have an integrated memory controller, and may have integrated graphics according to embodiments of the invention.
  • the solid lined boxes in Figure 9 illustrate a processor 900 with a single core 902A, a system agent 910, a set of one or more bus controller units 916, while the optional addition of the dashed lined boxes illustrates an alternative processor 900 with multiple cores 902A-N, a set of one or more integrated memory controller unit(s) 914 in the system agent unit 910, and special purpose logic 908.
  • different implementations of the processor 900 may include: 1) a CPU with the special purpose logic 908 being integrated graphics and/or scientific (throughput) logic (which may include one or more cores), and the cores 902A-N being one or more general purpose cores (e.g., general purpose in-order cores, general purpose out-of-order cores, a combination of the two); 2) a coprocessor with the cores 902A-N being a large number of special purpose cores intended primarily for graphics and/or scientific (throughput); and 3) a coprocessor with the cores 902A-N being a large number of general purpose in-order cores.
  • the special purpose logic 908 being integrated graphics and/or scientific (throughput) logic
  • the cores 902A-N being one or more general purpose cores (e.g., general purpose in-order cores, general purpose out-of-order cores, a combination of the two)
  • a coprocessor with the cores 902A-N being a large number of special purpose
  • the processor 900 may be a general- purpose processor, coprocessor or special-purpose processor, such as, for example, a network or communication processor, compression engine, graphics processor, GPGPU (general purpose graphics processing unit), a high-throughput many integrated core (MIC) coprocessor (including 30 or more cores), embedded processor, or the like.
  • the processor may be implemented on one or more chips.
  • the processor 900 may be a part of and/or may be implemented on one or more substrates using any of a number of process technologies, such as, for example, BiCMOS, CMOS, or NMOS.
  • the memory hierarchy includes one or more levels of cache within the cores, a set or one or more shared cache units 906, and external memory (not shown) coupled to the set of integrated memory controller units 914.
  • the set of shared cache units 906 may include one or more mid-level caches, such as level 2 (L2), level 3 (L3), level 4 (L4), or other levels of cache, a last level cache (LLC), and/or combinations thereof. While in one embodiment a ring based interconnect unit 912 interconnects the integrated graphics logic 908, the set of shared cache units 906, and the system agent unit 910/integrated memory controller unit(s) 914, alternative embodiments may use any number of well-known techniques for interconnecting such units. In one embodiment, coherency is maintained between one or more cache units 906 and cores 902-A-N.
  • LLC last level cache
  • the system agent 910 includes those components coordinating and operating cores 902A-N.
  • the system agent unit 910 may include for example a power control unit (PCU) and a display unit.
  • the PCU may be or include logic and components needed for regulating the power state of the cores 902A-N and the integrated graphics logic 908.
  • the display unit is for driving one or more externally connected displays.
  • the cores 902A-N may be homogenous or heterogeneous in terms of architecture instruction set; that is, two or more of the cores 902A-N may be capable of execution the same instruction set, while others may be capable of executing only a subset of that instruction set or a different instruction set.
  • Figures 10-13 are block diagrams of exemplary computer architectures.
  • Other system designs and configurations known in the arts for laptops, desktops, handheld PCs, personal digital assistants, engineering workstations, servers, network devices, network hubs, switches, embedded processors, digital signal processors (DSPs), graphics devices, video game devices, set-top boxes, micro controllers, cell phones, portable media players, hand held devices, and various other electronic devices, are also suitable.
  • DSPs digital signal processors
  • graphics devices video game devices, set-top boxes, micro controllers, cell phones, portable media players, hand held devices, and various other electronic devices, are also suitable.
  • DSPs digital signal processors
  • a huge variety of systems or electronic devices capable of incorporating a processor and/or other execution logic as disclosed herein are generally suitable.
  • the system 1000 may include one or more processors 1010, 1015, which are coupled to a controller hub 1020.
  • the controller hub 1020 includes a graphics memory controller hub (GMCH) 1090 and an Input/Output Hub (IOH) 1050 (which may be on separate chips);
  • the GMCH 1090 includes memory and graphics controllers to which are coupled memory 1040 and a coprocessor 1045;
  • the IOH 1050 is couples input/output (I/O) devices 1060 to the GMCH 1090.
  • the memory and graphics controllers are integrated within the processor (as described herein), the memory 1040 and the coprocessor 1045 are coupled directly to the processor 1010, and the controller hub 1020 in a single chip with the IOH 1050.
  • processors 1015 may include one or more of the processing cores described herein and may be some version of the processor 900.
  • the memory 1040 may be, for example, dynamic random access memory (DRAM), phase change memory (PCM), or a combination of the two.
  • the controller hub 1020 communicates with the processor(s) 1010, 1015 via a multi-drop bus, such as a frontside bus (FSB), point-to-point interface such as QuickPath Interconnect (QPI), or similar connection 1095.
  • a multi-drop bus such as a frontside bus (FSB), point-to-point interface such as QuickPath Interconnect (QPI), or similar connection 1095.
  • the coprocessor 1045 is a special-purpose processor, such as, for example, a high-throughput MIC processor, a network or communication processor, compression engine, graphics processor, GPGPU, embedded processor, or the like.
  • controller hub 1020 may include an integrated graphics accelerator.
  • the processor 1010 executes instructions that control data processing operations of a general type. Embedded within the instructions may be coprocessor instructions. The processor 1010 recognizes these coprocessor instructions as being of a type that should be executed by the attached coprocessor 1045. Accordingly, the processor 1010 issues these coprocessor instructions (or control signals representing coprocessor instructions) on a coprocessor bus or other interconnect, to coprocessor 1045. Coprocessor(s) 1045 accept and execute the received coprocessor instructions.
  • multiprocessor system 1100 is a point-to-point interconnect system, and includes a first processor 1170 and a second processor 1180 coupled via a point-to-point interconnect 1150.
  • processors 1170 and 1180 may be some version of the processor 900.
  • processors 1170 and 1180 are respectively processors 1010 and 1015, while coprocessor 1138 is coprocessor 1045.
  • processors 1170 and 1180 are respectively processor 1010 coprocessor 1045.
  • Processors 1170 and 1180 are shown including integrated memory controller (IMC) units 1172 and 1182, respectively.
  • Processor 1170 also includes as part of its bus controller units point- to-point (P-P) interfaces 1176 and 1178; similarly, second processor 1180 includes P-P interfaces 1186 and 1188.
  • Processors 1170, 1180 may exchange information via a point-to-point (P-P) interface 1150 using P-P interface circuits 1178, 1188.
  • IMCs 1172 and 1182 couple the processors to respective memories, namely a memory 1132 and a memory 1134, which may be portions of main memory locally attached to the respective processors.
  • Processors 1170, 1180 may each exchange information with a chipset 1190 via individual P-P interfaces 1152, 1154 using point to point interface circuits 1176, 1194, 1186, 1198.
  • Chipset 1190 may optionally exchange information with the coprocessor 1138 via a high-performance interface 1139.
  • the coprocessor 1138 is a special-purpose processor, such as, for example, a high-throughput MIC processor, a network or communication processor, compression engine, graphics processor, GPGPU, embedded processor, or the like.
  • a shared cache (not shown) may be included in either processor or outside of both processors, yet connected with the processors via P-P interconnect, such that either or both processors' local cache information may be stored in the shared cache if a processor is placed into a low power mode.
  • first bus 1116 may be a Peripheral Component Interconnect (PCI) bus, or a bus such as a PCI Express bus or another third generation I/O interconnect bus, although the scope of the present invention is not so limited.
  • PCI Peripheral Component Interconnect
  • various I/O devices 1114 may be coupled to first bus 1116, along with a bus bridge 1118 which couples first bus 1116 to a second bus 1120.
  • one or more additional processor(s) 1115 such as coprocessors, high-throughput MIC processors, GPGPU's, accelerators (such as, e.g., graphics accelerators or digital signal processing (DSP) units), field programmable gate arrays, or any other processor, are coupled to first bus 1116.
  • second bus 1120 may be a low pin count (LPC) bus.
  • Various devices may be coupled to a second bus 1120 including, for example, a keyboard and/or mouse 1122, communication devices 1127 and a storage unit 1128 such as a disk drive or other mass storage device which may include instructions/code and data 1130, in one embodiment.
  • a storage unit 1128 such as a disk drive or other mass storage device which may include instructions/code and data 1130, in one embodiment.
  • an audio I/O 1124 may be coupled to the second bus 1120.
  • a system may implement a multi-drop bus or other such architecture.
  • FIG. 12 shown is a block diagram of a second more specific exemplary system 1200 in accordance with an embodiment of the present invention.
  • Like elements in Figures 11 and 12 bear like reference numerals, and certain aspects of Figure 11 have been omitted from Figure 12 in order to avoid obscuring other aspects of Figure 12.
  • FIG 12 illustrates that the processors 1170, 1180 may include integrated memory and I/O control logic ("CL") 1172 and 1182, respectively.
  • CL 1172, 1182 include integrated memory controller units and include I/O control logic.
  • Figure 12 illustrates that not only are the memories 1132, 1134 coupled to the CL 1172, 1182, but also that I/O devices 1214 are also coupled to the control logic 1172, 1182.
  • Legacy I/O devices 1215 are coupled to the chipset 1190.
  • an interconnect unit(s) 1302 is coupled to: an application processor 1310 which includes a set of one or more cores 202A-N and shared cache unit(s) 906; a system agent unit 910; a bus controller unit(s) 916; an integrated memory controller unit(s) 914; a set or one or more coprocessors 1320 which may include integrated graphics logic, an image processor, an audio processor, and a video processor; an static random access memory (SRAM) unit 1330; a direct memory access (DMA) unit 1332; and a display unit 1340 for coupling to one or more external displays.
  • the coprocessor(s) 1320 include a special -purpose processor, such as, for example, a network or communication processor, compression engine, GPGPU,
  • Embodiments of the mechanisms disclosed herein may be implemented in hardware, software, firmware, or a combination of such implementation approaches.
  • Embodiments of the invention may be implemented as computer programs or program code executing on programmable systems comprising at least one processor, a storage system (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device.
  • Program code such as code 1130 illustrated in Figure 11, may be applied to input instructions to perform the functions described herein and generate output information.
  • the output information may be applied to one or more output devices, in known fashion.
  • a processing system includes any system that has a processor, such as, for example; a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • the program code may be implemented in a high level procedural or object oriented programming language to communicate with a processing system.
  • the program code may also be implemented in assembly or machine language, if desired.
  • the mechanisms described herein are not limited in scope to any particular programming language. In any case, the language may be a compiled or interpreted language.
  • IP cores may be stored on a tangible, machine readable medium and supplied to various customers or manufacturing facilities to load into the fabrication machines that actually make the logic or processor.
  • Such machine-readable storage media may include, without limitation, non-transitory, tangible arrangements of articles manufactured or formed by a machine or device, including storage media such as hard disks, any other type of disk including floppy disks, optical disks, compact disk readonly memories (CD-ROMs), compact disk rewritable's (CD-RWs), and magneto-optical disks, semiconductor devices such as read-only memories (ROMs), random access memories (RAMs) such as dynamic random access memories (DRAMs), static random access memories (SRAMs), erasable programmable read-only memories (EPROMs), flash memories, electrically erasable programmable read-only memories (EEPROMs), phase change memory (PCM), magnetic or optical cards, or any other type of media suitable for storing electronic instructions.
  • storage media such as hard disks, any other type of disk including floppy disks, optical disks, compact disk readonly memories (CD-ROMs), compact disk rewritable's (CD-RWs), and magneto-opti
  • embodiments of the invention also include non-transitory, tangible machine- readable media containing instructions or containing design data, such as Hardware Description Language (HDL), which defines structures, circuits, apparatuses, processors and/or system features described herein.
  • HDL Hardware Description Language
  • Such embodiments may also be referred to as program products.
  • Emulation including binary translation, code morphing, etc.
  • an instruction converter may be used to convert an instruction from a source instruction set to a target instruction set.
  • the instruction converter may translate (e.g., using static binary translation, dynamic binary translation including dynamic compilation), morph, emulate, or otherwise convert an instruction to one or more other instructions to be processed by the core.
  • the instruction converter may be implemented in software, hardware, firmware, or a combination thereof.
  • the instruction converter may be on processor, off processor, or part on and part off processor.
  • Figure 14 is a block diagram contrasting the use of a software instruction converter to convert binary instructions in a source instruction set to binary instructions in a target instruction set according to embodiments of the invention.
  • the instruction converter is a software instruction converter, although alternatively the instruction converter may be implemented in software, firmware, hardware, or various combinations thereof.
  • Figure 14 shows a program in a high level language 1402 may be compiled using an x86 compiler 1404 to generate x86 binary code 1406 that may be natively executed by a processor with at least one x86 instruction set core 1416.
  • the processor with at least one x86 instruction set core 1416 represents any processor that can perform substantially the same functions as an Intel processor with at least one x86 instruction set core by compatibly executing or otherwise processing (1) a substantial portion of the instruction set of the Intel x86 instruction set core or (2) object code versions of applications or other software targeted to run on an Intel processor with at least one x86 instruction set core, in order to achieve substantially the same result as an Intel processor with at least one x86 instruction set core.
  • the x86 compiler 1404 represents a compiler that is operable to generate x86 binary code 1406 (e.g., object code) that can, with or without additional linkage processing, be executed on the processor with at least one x86 instruction set core 1416.
  • Figure 14 shows the program in the high level language 1402 may be compiled using an alternative instruction set compiler 1408 to generate alternative instruction set binary code 1410 that may be natively executed by a processor without at least one x86 instruction set core 1414 (e.g., a processor with cores that execute the MIPS instruction set of MIPS Technologies of Sunnyvale, CA and/or that execute the ARM instruction set of ARM Holdings of Sunnyvale, CA).
  • the instruction converter 1412 is used to convert the x86 binary code 1406 into code that may be natively executed by the processor without an x86 instruction set core 1414.
  • This converted code is not likely to be the same as the alternative instruction set binary code 1410 because an instruction converter capable of this is difficult to make; however, the converted code will accomplish the general operation and be made up of instructions from the alternative instruction set.
  • the instruction converter 1412 represents software, firmware, hardware, or a combination thereof that, through emulation, simulation or any other process, allows a processor or other electronic device that does not have an x86 instruction set processor or core to execute the x86 binary code 1406.
  • Coupled may mean that two or more elements are in direct physical or electrical contact. However, “coupled” may also mean that two or more elements are not in direct contact with each other, but yet still co-operate or interact with each other.
  • One or more embodiments includes an article of manufacture (e.g., a computer program product) that includes a machine-accessible and/or machine-readable medium.
  • the medium may include, a mechanism that provides, for example stores or transmits, information in a form that is accessible and/or readable by the machine.
  • the machine-accessible and/or machine-readable medium may provide, or have stored thereon, one or more or a sequence of instructions and/or data structures that if executed by a machine causes or results in the machine performing, and/or causes the machine to perform, one or more or a portion of the operations or methods or the techniques shown in the figures disclosed herein.
  • the machine-readable medium may include a tangible non-transitory machine-readable storage media.
  • the tangible non-transitory machine-readable storage media may include a floppy diskette, an optical storage medium, an optical disk, a CD-ROM, a magnetic disk, a magneto-optical disk, a read only memory (ROM), a programmable ROM
  • the tangible medium may include one or more solid or tangible physical materials, such as, for example, a semiconductor material, a phase change material, a magnetic material, etc.
  • suitable machines include, but are not limited to, computer systems, desktops, laptops, notebooks, netbooks, nettops, Mobile Internet devices (MIDs), network devices, routers, switches, cellular phones, media players, and other electronic devices having one or more processors or other instruction execution devices.
  • Such electronic devices typically include one or more processors coupled with one or more other components, such as one or more storage devices (non- transitory machine-readable storage media), user input/output devices (e.g., a keyboard, a touchscreen, and/or a display), and/or network connections.
  • the coupling of the processors and other components is typically through one or more busses and bridges (also termed bus controllers).
  • the storage device of a given electronic device may stores code and/or data for execution on the one or more processors of that electronic device.
  • one or more parts of an embodiment of the invention may be implemented using different combinations of software, firmware, and/or hardware.
  • a first method in a processor of handling physical register use includes determining that a first thread is attempting to enter a transitory higher physical register use mode.
  • a physical register use threshold of a second thread is reduced from a higher physical register use threshold to a lower physical register use threshold, in response to determining that the first thread is attempting to enter the transitory higher physical register use mode. It is determined that a physical register use value of the second thread is not within the lower physical register use threshold.
  • the first thread is prevented from entering the transitory higher physical register use mode, while the physical register use value of the second thread is not within the lower physical register use threshold.
  • Embodiments include the first method in which allocation of additional physical registers to the second thread is prevented, while the physical register use value of the second thread is not within the lower physical register use threshold, and while allowing instructions of the second thread to commit.
  • Embodiments include the above method, in which after preventing the first thread from entering the transitory higher physical register use mode, a determination is made that an updated physical register use value of the second thread is within the lower physical register use threshold due to the instructions of the second thread being allowed to commit.
  • the first thread is allowed to enter the transitory higher physical register use mode, while the updated physical register use value is within the lower physical register use threshold.
  • Embodiments include the first method in which determining that the first thread is attempting to enter the transitory higher physical register use mode includes determining that the first thread is attempting to perform hardware based transactional execution. Allocation of additional physical registers to the second thread is prevented, while the physical register use value of the second thread is not within the lower physical register use threshold, and while allowing instructions of the second thread to commit. It is determined that an updated physical register use value of the second thread is within the lower physical register use threshold. The first thread is allowed to perform the hardware based transactional execution in response to determining that the updated physical register use value of the second thread is within the lower physical register use threshold.
  • reducing the physical register use threshold from the higher threshold to the lower threshold may include reducing the physical register use threshold by at least 10 (e.g., 10 to 50) physical registers.
  • Embodiments include the first method in which after preventing the first thread from entering the transitory higher physical register use mode, a determination is made that the first thread is no longer attempting to enter the transitory higher physical register use mode.
  • the physical register use threshold of the second thread is increased from the lower physical register use threshold to the higher physical register use threshold, in response to determining that the first thread is no longer attempting to enter the transitory higher physical register use mode.
  • Embodiments include any of the above methods in which reducing the physical register use threshold from the higher threshold to the lower threshold includes reducing the physical register use threshold by at least 10 physical registers.
  • Embodiments include any of the above methods in which determining that the first thread is attempting to enter the transitory higher physical register use mode includes determining that the first thread is attempting to perform hardware based transactional execution.
  • a first apparatus to handle physical register use includes threshold adjustment logic to reduce a physical register use threshold of a second thread from a higher physical register use threshold to a lower physical register use threshold, in response to a first thread attempting to enter a transitory higher physical register use mode.
  • Threshold comparison logic is included to determine that a physical register use value of the second thread is not within the lower physical register use threshold.
  • Prevention logic is included to prevent the first thread from entering the transitory higher physical register use mode, while the physical register use value of the second thread is not within the lower physical register use threshold.
  • Embodiments include the first apparatus including thread stall logic to stall the second thread, while the physical register use value of the second thread is not within the lower physical register use threshold, and while allowing instructions of the second thread to commit.
  • Embodiments include the above apparatus, in which the threshold comparison logic, after determining that the physical register use value of the second thread is not within the lower physical register use threshold, is to determine that an updated physical register use value of the second thread is within the lower physical register use threshold. In response, the prevention logic is no longer to prevent the first thread from entering the transitory higher physical register use mode.
  • Embodiments include any of the above apparatus including logic to determine that the first thread is attempting to enter the transitory higher physical register use mode.
  • the higher physical register use mode includes hardware based transactional execution.
  • Embodiments include the first apparatus including thread stall logic to stall the second thread, while the physical register use value of the second thread is not within the lower physical register use threshold, and while allowing instructions of the second thread to commit.
  • the higher physical register use mode includes hardware based transactional execution.
  • a system to handle physical register includes an interconnect.
  • a processor is coupled with the interconnect.
  • the processor includes a higher physical register use threshold of a second thread that is to be used when a first thread is not attempting to enter a transitory higher physical register use mode.
  • a lower physical register use threshold of the second thread is to be used when the first thread is attempting to enter the transitory higher physical register use mode.
  • Prevention logic of the processor is to prevent the first thread from entering the transitory higher physical register use mode when a physical register use value of the second thread is not within the lower physical register use threshold.
  • the system includes a dynamic random access memory (DRAM) coupled with the interconnect.
  • DRAM dynamic random access memory
  • Embodiments include the system in which the transitory higher physical register use mode includes a transactional execution mode.
  • Embodiments include any of the above systems including thread stall logic to stall the second thread, while the physical register use value of the second thread is not within the lower physical register use threshold, and while allowing instructions of the second thread to commit.
  • an article of manufacture includes a machine-accessible medium that provides instructions that if executed result in a machine performing operations including determining that a first thread is attempting to enter a transitory higher physical register use mode.
  • the operations also include reducing a physical register use threshold of a second thread from a higher physical register use threshold to a lower physical register use threshold, in response to determining that the first thread is attempting to enter the transitory higher physical register use mode.
  • the operations also include determining that a physical register use value of the second thread is not within the lower physical register use threshold.
  • the operations also include preventing the first thread from entering the transitory higher physical register use mode, while the physical register use value of the second thread is not within the lower physical register use threshold.
  • Embodiments include the article in which the instructions to determine that the first thread is attempting to enter the higher physical register use mode include instructions that if executed result in the machine determining that the first thread is attempting to perform hardware based transactional execution.
  • Embodiments include any of the above articles including in which the machine-accessible medium further provides instructions that if executed result in the machine performing operations including preventing allocation of additional physical registers to the second thread, while the physical register use value of the second thread is not within the lower physical register use threshold, and while allowing instructions of the second thread to commit.
  • a second apparatus to handle physical register use includes means for determining that a first thread is attempting to enter a transitory higher physical register use mode. Also included are means for reducing a physical register use threshold of a second thread from a higher physical register use threshold to a lower physical register use threshold, in response to determining that the first thread is attempting to enter the transitory higher physical register use mode. The apparatus also includes means for determining that a physical register use value of the second thread is not within the lower physical register use threshold. Additionally including means for preventing the first thread from entering the transitory higher physical register use mode, while the physical register use value of the second thread is not within the lower physical register use threshold.
  • Embodiments include the second apparatus including means for preventing allocation of additional physical registers to the second thread, while the physical register use value of the second thread is not within the lower physical register use threshold, and while allowing instructions of the second thread to commit.
  • At least one machine-readable medium includes instructions that in response to being executed on a computing device cause the computing device to carry out any of the methods disclosed herein.
  • an apparatus is configured to perform any of the methods disclosed herein.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Executing Machine-Instructions (AREA)

Abstract

Le procédé selon l'invention dans un processeur consistant à manipuler l'utilisation de registre physique d'un aspect consiste à déterminer qu'un premier fil tente d'entrer dans un mode d'utilisation de registre physique supérieur transitoire. Un seuil d'utilisation de registre physique d'un second fil est réduit d'un seuil d'utilisation de registre physique supérieur à un seuil d'utilisation de registre physique inférieur, en réponse à la détermination que le premier fil tente d'entrer dans le mode d'utilisation de registre physique supérieur transitoire. On détermine qu'une valeur d'utilisation de registre physique du second fil n'est pas dans le seuil d'utilisation de registre physique inférieur. On empêche le premier fil d'entrer dans le mode d'utilisation de registre physique supérieur transitoire, tandis que la valeur d'utilisation de registre physique du second fil n'est pas dans le seuil d'utilisation de registre physique inférieur.
PCT/US2012/031710 2012-03-30 2012-03-30 Réglage du seuil d'utilisation de registre physique dynamique et décrochage à fils croisés dans les processeurs multi-fils WO2013147895A2 (fr)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/US2012/031710 WO2013147895A2 (fr) 2012-03-30 2012-03-30 Réglage du seuil d'utilisation de registre physique dynamique et décrochage à fils croisés dans les processeurs multi-fils

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/US2012/031710 WO2013147895A2 (fr) 2012-03-30 2012-03-30 Réglage du seuil d'utilisation de registre physique dynamique et décrochage à fils croisés dans les processeurs multi-fils

Publications (1)

Publication Number Publication Date
WO2013147895A2 true WO2013147895A2 (fr) 2013-10-03

Family

ID=49261378

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US2012/031710 WO2013147895A2 (fr) 2012-03-30 2012-03-30 Réglage du seuil d'utilisation de registre physique dynamique et décrochage à fils croisés dans les processeurs multi-fils

Country Status (1)

Country Link
WO (1) WO2013147895A2 (fr)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10831537B2 (en) 2017-02-17 2020-11-10 International Business Machines Corporation Dynamic update of the number of architected registers assigned to software threads using spill counts

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10831537B2 (en) 2017-02-17 2020-11-10 International Business Machines Corporation Dynamic update of the number of architected registers assigned to software threads using spill counts
US11275614B2 (en) 2017-02-17 2022-03-15 International Business Machines Corporation Dynamic update of the number of architected registers assigned to software threads using spill counts

Similar Documents

Publication Publication Date Title
US10489158B2 (en) Processors, methods, systems, and instructions to selectively fence only persistent storage of given data relative to subsequent stores
US10318295B2 (en) Transaction end plus commit to persistence instructions, processors, methods, and systems
US9411739B2 (en) System, method and apparatus for improving transactional memory (TM) throughput using TM region indicators
US9747108B2 (en) User-level fork and join processors, methods, systems, and instructions
US20140095847A1 (en) Instruction and highly efficient micro-architecture to enable instant context switch for user-level threading
US10191742B2 (en) Mechanism for saving and retrieving micro-architecture context
US20170286114A1 (en) Processors, methods, and systems to allocate load and store buffers based on instruction type
US10127039B2 (en) Extension of CPU context-state management for micro-architecture state
US20170286118A1 (en) Processors, methods, systems, and instructions to fetch data to indicated cache level with guaranteed completion
US9092346B2 (en) Speculative cache modification
US9354875B2 (en) Enhanced loop streaming detector to drive logic optimization
KR101806279B1 (ko) 명령어 순서 강제 명령어들의 쌍들, 프로세서들, 방법들, 및 시스템들
US10067762B2 (en) Apparatuses, methods, and systems for memory disambiguation
US20160283247A1 (en) Apparatuses and methods to selectively execute a commit instruction
US11048516B2 (en) Systems, methods, and apparatuses for last branch record support compatible with binary translation and speculative execution using an architectural bit array and a write bit array
US9886396B2 (en) Scalable event handling in multi-threaded processor cores
US10261909B2 (en) Speculative cache modification
WO2013147895A2 (fr) Réglage du seuil d'utilisation de registre physique dynamique et décrochage à fils croisés dans les processeurs multi-fils
US20160378497A1 (en) Systems, Methods, and Apparatuses for Thread Selection and Reservation Station Binding

Legal Events

Date Code Title Description
WA Withdrawal of international application
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12872957

Country of ref document: EP

Kind code of ref document: A2