Claims
- 1. A method for managing transitions between multi-threaded and single-threaded execution in a processor, comprising:
receiving an instruction indicating a thread mode switch; setting thread enable signals indicating an enable state of multiple threads, wherein one or more threads are specified for further execution; and reallocating resources within said processor in conformity with a quantity of one or more threads specified for further execution by said received instruction.
- 2. The method of claim 1, further comprising prior to said reallocating, stopping execution of all threads executing within said processor and quiescing instruction sequencing on said processor.
- 3. The method of claim 2, further comprising:
subsequent to said stopping, waiting for instruction sequencing to quiesce and completion tables of said processor to be empty; and in response to completion of said waiting, performing said reallocating.
- 4. The method of claim 1, wherein said receiving receives an instruction for a switch from single-threaded mode to multi-threaded mode and wherein said reallocating partitions said resources into multiple partitions each associated with one of said one or more threads.
- 5. The method of claim 1, wherein said partitions are of equal size.
- 6. The method of claim 1, wherein said receiving receives an instruction for a switch from multi-threaded mode to single-threaded mode, wherein said resources have been previously partitioned, and wherein said reallocating merges each of said partitions of said resources into a single partition associated with a single thread specified for further execution.
- 7. The method of claim 1, wherein said reallocating reallocates instruction queues within said processor.
- 8. The method of claim 1, wherein said reallocating reallocates architected registers within said processor.
- 9. The method of claim 1, wherein said reallocating reallocates load/store queues and load/store tag storage within said processor.
- 10. The method of claim 1, wherein said reallocating reallocates data prefetch streams within said processor.
- 11. A processor supporting concurrent execution of multiple threads and having a single-threaded operating mode and a multi-threaded operating mode, said processor comprising:
an instruction decoder supporting a decode of a thread mode change instruction; at least one resource supporting execution of instructions within said processor, said resource having partitions allocable by thread; a thread enable register for receiving a thread enable state specifying a requested enable state of multiple threads; and control logic coupled to said instruction decoder for controlling execution units of said processor, and wherein said control logic signals said resources to reallocate in conformity with said requested enable state.
- 12. The processor of claim 11, wherein said control logic sends signals to said one or more execution units directing the one or more execution units to stop execution of all threads executing within said processor and quiesce instruction sequencing on said processor.
- 13. The processor of claim 12, wherein said control logic further waits for instruction sequencing to quiesce and for completion tables of said processor to be empty, and in response to completion of said waiting, signals said resources to reallocate.
- 14. The processor of claim 11, wherein said instruction decoder receives a thread mode change instruction directing a switch from single-threaded mode to multi-threaded mode and wherein said control logic signals said resources to partition into multiple partitions each associated with one of said one or more threads.
- 15. The processor of claim 14, wherein said partitions are of equal size.
- 16. The processor of claim 11, wherein said instruction decoder receives a thread mode change instruction directing a switch from multi-threaded mode to single-threaded mode and wherein said control logic signals said resources to merge any partitions into a single partition for use by a single thread specified for further execution.
- 17. The processor of claim 11, wherein one of said resources is an instruction queue having partitions allocable by thread.
- 18. The processor of claim 11, wherein one of said resources is a set of architected registers having partitions allocable by thread.
- 19. The processor of claim 11, wherein one of said resources is a set of load/store queues and load/store tags having partitions allocable by thread.
- 20. The processor of claim 11, wherein one of said resources is a prefetch stream storage having partitions allocable by thread.
- 21. A processor supporting concurrent execution of multiple threads and having a single-threaded operating mode and a multi-threaded operating mode, said processor comprising:
an instruction decoder supporting a decode of a thread mode change instruction; instruction queue having partitions allocable by thread; a set of architected registers having partitions allocable by thread; a set of load/store queues and load/store tags having partitions allocable by thread; a prefetch stream storage having partitions allocable by thread; a thread enable register for receiving a thread enable state specifying a requested enable state of multiple threads; and control logic coupled to said instruction decoder for controlling execution units of said processor, wherein said control logic signals said one or more execution to stop execution of all threads executing within said processor, waits for instruction sequencing to quiesce and for completion tables of said processor to be empty, in response to completion of said waiting, signals said instruction queue, said set of architected registers, said set of load/store queues and said prefetch stream storage to reallocate in conformity with said requested enable state, and starts execution of one or more threads in conformity with said requested enable state.
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] The present application is related to co-pending U.S. Patent Applications: docket number AUS920030217US1 entitled “METHOD AND LOGICAL APPARATUS FOR MANAGING THREAD EXECUTION IN A SIMULTANEOUS MULTI-THREADED (SMT) PROCESSOR”, docket number AUS920030229US1 entitled “METHOD AND LOGICAL APPARATUS FOR RENAME REGISTER REALLOCATION IN A SIMULTANEOUS MULTI-THREADED (SMT) PROCESSOR”, and docket number ROC920030068US1 entitled “DYNAMIC SWITCHING OF MULTITHREADED PROCESSOR BETWEEN SINGLE THREADED AND SIMULTANEOUS MULTITHREADED MODES”, filed concurrently with this application. The specifications of the above-referenced patent applications are incorporated herein by reference.