Cache-aware thread scheduling in multi-threaded systems
First Claim
1. A method for predictively scheduling a thread in a multi-threaded processor, comprising:
- executing a first thread in a processor core associated with a shared cache that is also associated with a second processor core;
executing a second thread in a third processor core which is not associated with the cache;
executing a third thread in the second processor core;
while executing the first thread, measuring one or more metrics to characterize the first thread;
measuring one or more metrics to characterize the second thread;
measuring one or more metrics to characterize the third thread;
using the characterization of the first thread and a characterization of a second thread to predict a performance impact associated with simultaneously executing the second thread in a second processor core which is associated with the cache, wherein predicting the performance impact comprises predicting an impact in an execution metric for the first thread and an impact in an execution metric for the second thread while the first thread and the second thread access the shared cache when simultaneously executing, and wherein predicting the performance impact involves using the characterization of the third thread and the characterization of the second thread in addition to the characterization of the first thread to determine whether migrating the second thread to the second processor core will improve performance for the multi-threaded processor; and
when the predicted performance impact indicates that executing the second thread on the second processor core will improve performance for the multi-threaded processor, executing the second thread on the second processor core.
1 Assignment
0 Petitions
Accused Products
Abstract
The disclosed embodiments provide a system that facilitates scheduling threads in a multi-threaded processor with multiple processor cores. During operation, the system executes a first thread in a processor core that is associated with a shared cache. During this execution, the system measures one or more metrics to characterize the first thread. Then, the system uses the characterization of the first thread and a characterization for a second, second thread to predict a performance impact that would occur if the second thread were to simultaneously execute in a second processor core that is also associated with the cache. If the predicted performance impact indicates that executing the second thread on the second processor core will improve performance for the multi-threaded processor, the system executes the second thread on the second processor core.
29 Citations
19 Claims
-
1. A method for predictively scheduling a thread in a multi-threaded processor, comprising:
-
executing a first thread in a processor core associated with a shared cache that is also associated with a second processor core; executing a second thread in a third processor core which is not associated with the cache; executing a third thread in the second processor core; while executing the first thread, measuring one or more metrics to characterize the first thread; measuring one or more metrics to characterize the second thread; measuring one or more metrics to characterize the third thread; using the characterization of the first thread and a characterization of a second thread to predict a performance impact associated with simultaneously executing the second thread in a second processor core which is associated with the cache, wherein predicting the performance impact comprises predicting an impact in an execution metric for the first thread and an impact in an execution metric for the second thread while the first thread and the second thread access the shared cache when simultaneously executing, and wherein predicting the performance impact involves using the characterization of the third thread and the characterization of the second thread in addition to the characterization of the first thread to determine whether migrating the second thread to the second processor core will improve performance for the multi-threaded processor; and when the predicted performance impact indicates that executing the second thread on the second processor core will improve performance for the multi-threaded processor, executing the second thread on the second processor core. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. A non-transitory computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method for predictively scheduling a thread in a multi-threaded processor, the method comprising:
-
executing a first thread in a processor core associated with a shared cache that is also associated with a second processor core; executing a second thread in a third processor core which is not associated with the cache; executing a third thread in the second processor core; while executing the first thread, measuring one or more metrics to characterize the first thread; measuring one or more metrics to characterize the second thread; measuring one or more metrics to characterize the third thread; using the characterization of the first thread and a characterization of a second thread to predict a performance impact associated with simultaneously executing the second thread in a second processor core which is associated with the cache, wherein predicting the performance impact comprises predicting an impact in an execution metric for the first thread and an impact in an execution metric for the second thread while the first thread and the second thread access the shared cache when simultaneously executing, and wherein predicting the performance impact involves using the characterization of the third thread and the characterization of the second thread in addition to the characterization of the first thread to determine whether migrating the second thread to the second processor core will improve performance for the multi-threaded processor; and when the predicted performance impact indicates that executing the second thread on the second processor core will improve performance for the multi-threaded processor, executing the second thread on the second processor core. - View Dependent Claims (14, 15, 16, 17, 18)
-
-
19. A multi-threaded processor that facilitates predictive thread scheduling, comprising:
-
a first processor core; a second processor core; a third processor core which is not associated with the cache; a first cache associated with the first processor core and the second processor core; a measurement mechanism that is configured to measure one or more metrics to characterize a first thread executing in the first processor core, one or more metrics to characterize the second thread, and one or more metrics to characterize the third thread; a prediction mechanism that is configured to use the characterization of the first thread and a characterization of a second thread to predict a performance impact associated with simultaneously executing the second thread in the second processor core, wherein, while predicting the performance impact, the prediction mechanism is further configured to predict an impact in an execution metric for the first thread and an impact in an execution metric for the second thread while the first thread and the second thread access the shared cache when simultaneously executing, and wherein, while predicting the performance impact, the prediction mechanism is configured to use the characterization of the third thread and the characterization of the second thread in addition to the characterization of the first thread to determine whether migrating the second thread to the second processor core will improve performance for the multi-threaded processor; and a scheduling mechanism that is configured to execute the second thread on the second processor core when the predicted performance impact indicates that executing the second thread on the second processor will improve performance for the multi-threaded processor.
-
Specification