Averting lock contention associated with core-based hardware threading in a split core environment
First Claim
1. A method for managing lock contention in a processor, comprising:
- tracking, in a table stored in a memory, a current total amount of time that one or more software threads are prevented from execution due to a lock;
tracking, in the table, a current utilization of one or more hardware threads in the processor, wherein each of the hardware threads form an execution stream on a processor core;
tracking, in the table, a current number of software threads that are dispatched to the hardware threads for execution on the processor core;
if the current total amount of time exceeds a predetermined threshold, performing a comparison of the current total amount of time, the current utilization, and the current number of software threads to one or more past measurements;
based on the comparison, predicting that reducing a number of active hardware threads will reduce a wait time by;
determining that the one or more past measurements comprise a smaller number of active hardware threads compared to a current number of active hardware threads; and
determining that the one or more past measurements associated with the smaller number of active hardware threads comprise a reduced wait time for software threads compared to the current total amount of time; and
if reducing the number of active hardware threads will reduce the wait time, reducing the number of active hardware threads.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques are disclosed for managing lock contention in a multithreaded processing system. In one embodiment, a method includes tracking a current total amount of time that one or more software threads are prevented from execution due to a lock, a current utilization of one or more hardware threads in the processor, and a current number of dispatchable software threads. If the current total amount of time exceeds a predetermined threshold, the method includes performing a comparison of the current total amount of time, the current utilization, and the current number of dispatchable software threads to one or more past measurements. Based on the comparison, the method includes determining if reducing a number of active hardware threads will reduce a wait time. If reducing the number of active hardware threads will reduce the wait time, reducing the number of active hardware threads.
18 Citations
20 Claims
-
1. A method for managing lock contention in a processor, comprising:
-
tracking, in a table stored in a memory, a current total amount of time that one or more software threads are prevented from execution due to a lock; tracking, in the table, a current utilization of one or more hardware threads in the processor, wherein each of the hardware threads form an execution stream on a processor core; tracking, in the table, a current number of software threads that are dispatched to the hardware threads for execution on the processor core; if the current total amount of time exceeds a predetermined threshold, performing a comparison of the current total amount of time, the current utilization, and the current number of software threads to one or more past measurements; based on the comparison, predicting that reducing a number of active hardware threads will reduce a wait time by; determining that the one or more past measurements comprise a smaller number of active hardware threads compared to a current number of active hardware threads; and determining that the one or more past measurements associated with the smaller number of active hardware threads comprise a reduced wait time for software threads compared to the current total amount of time; and if reducing the number of active hardware threads will reduce the wait time, reducing the number of active hardware threads. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computer program product for managing lock contention, the computer program product comprising a non-transitory computer-readable storage medium having computer-readable program code embodied therewith, the computer-readable program code executable by a processor to cause the processor to:
-
track, in a table stored in a memory, a current total amount of time that one or more software threads are prevented from execution due to a lock; track, in the table, a current utilization of one or more hardware threads in the processor, wherein each of the hardware threads form an execution stream on a processor core; track, in the table, a current number of software threads that are dispatched to the hardware threads for execution on the processor core; if the current total amount of time exceeds a predetermined threshold, perform a comparison of the current total amount of time, the current utilization, and the current number of software threads to one or more past measurements; based on the comparison, predict that reducing a number of active hardware threads will reduce a wait time by; determining that the one or more past measurements comprise a smaller number of active hardware threads compared to a current number of active hardware threads; and determining that the one or more past measurements associated with the smaller number of active hardware threads comprise a reduced wait time for software threads compared to the current total amount of time; and if reducing the number of active hardware threads will reduce the wait time, reduce the number of active hardware threads. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A system, comprising:
-
a processor; and a memory storing a program, which, when executed on the processor, performs an operation for managing lock contention, the operation comprising; tracking, in a table stored in a memory, a current total amount of time that one or more software threads are prevented from execution due to a lock; tracking, in the table, a current utilization of one or more hardware threads in the processor, wherein each of the hardware threads form an execution stream on a processor core; tracking, in the table, a current number of software threads that are dispatched to the hardware threads for execution on the processor core; if the current total amount of time exceeds a predetermined threshold, performing a comparison of the current total amount of time, the current utilization, and the current number of software threads to one or more past measurements; based on the comparison, predicting that reducing a number of active hardware threads will reduce a wait time by; determining that the one or more past measurements comprise a smaller number of active hardware threads compared to a current number of active hardware threads; and determining that the one or more past measurements associated with the smaller number of active hardware threads comprise a reduced wait time for software threads compared to the current total amount of time; and if reducing the number of active hardware threads will reduce the wait time, reducing the number of active hardware threads. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification