Thread context restoration in a multithreading computer system
First Claim
1. A computer system, comprising:
- a configuration comprising a core configurable between a single thread (ST) mode and a multithreading (MT) mode, the ST mode addressing a primary thread and the MT mode addressing the primary thread and one or more secondary threads on shared resources of the core; and
a multithreading facility configured to control utilization of the configuration to perform a method comprising;
based on switching from the MT mode to the ST mode, disabling the one or more secondary threads, wherein a thread context comprising program accessible register values and program counter values of the one or more secondary threads is made unavailable to programs;
querying a last-specified maximum MT level in the ST mode to determine a last-set program-specified maximum thread-id of the configuration; and
based on the last-set program-specified maximum thread-id indicating MT, obtaining the thread context of the one or more secondary threads by performing a) and b) comprising;
a) executing a set MT instruction to resume the MT mode; and
b) based on being in the resumed MT mode, accessing the thread context of the one or more secondary threads.
1 Assignment
0 Petitions
Accused Products
Abstract
Embodiments relate to thread context restoration. One aspect is a multithreading computer system including a configuration with a core configurable between a single thread (ST) mode and a multithreading (MT) mode. The ST mode addresses a primary thread and the MT mode addresses the primary thread and one or more secondary threads on shared resources of the core. A multithreading facility is configured to control utilization of the configuration to perform a method including disabling one or more secondary threads based on switching from MT mode to ST mode. A thread context of secondary threads is made unavailable to programs. Based on a last-set program-specified maximum thread-id indicating MT, the thread context is obtained by a) executing a set MT instruction to resume the MT mode, and b) based on being in the resumed MT mode, accessing the thread context.
-
Citations
13 Claims
-
1. A computer system, comprising:
-
a configuration comprising a core configurable between a single thread (ST) mode and a multithreading (MT) mode, the ST mode addressing a primary thread and the MT mode addressing the primary thread and one or more secondary threads on shared resources of the core; and a multithreading facility configured to control utilization of the configuration to perform a method comprising; based on switching from the MT mode to the ST mode, disabling the one or more secondary threads, wherein a thread context comprising program accessible register values and program counter values of the one or more secondary threads is made unavailable to programs; querying a last-specified maximum MT level in the ST mode to determine a last-set program-specified maximum thread-id of the configuration; and based on the last-set program-specified maximum thread-id indicating MT, obtaining the thread context of the one or more secondary threads by performing a) and b) comprising; a) executing a set MT instruction to resume the MT mode; and b) based on being in the resumed MT mode, accessing the thread context of the one or more secondary threads. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A computer program product for thread context restoration in a configuration comprising a core configurable between a single thread (ST) mode and a multithreading (MT) mode, the ST mode addressing a primary thread and the MT mode addressing the primary thread and one or more secondary threads on shared resources of the core, the computer program product comprising:
a computer readable storage medium having program instructions embodied therewith, wherein the computer readable storage medium is not a signal, the program instructions readable by a processing circuit to cause the processing circuit to perform a method comprising; based on switching from the MT mode to the ST mode, disabling the one or more secondary threads, wherein a thread context comprising program accessible register values and program counter values of the one or more secondary threads is made unavailable to programs; querying a last-specified maximum MT level in the ST mode to determine a last-set program-specified maximum thread-id of the configuration; and based on the last-set program-specified maximum thread-id indicating MT, obtaining the thread context of the one or more secondary threads by performing a) and b) comprising; a) executing a set MT instruction to resume the MT mode; and b) based on being in the resumed MT mode, accessing the thread context of the one or more secondary threads. - View Dependent Claims (10, 11, 12, 13)
Specification