Averting lock contention associated with core-based hardware threading in a split core environment
First Claim
Patent Images
1. A method for managing lock contention in a processor, comprising:
- executing a first software thread comprising a first operation which executes a first lock at an address of the first lock;
receiving, during the execution of the first lock, a request from a second software thread comprising a load request to the address of the first lock, wherein the first lock prevents the second software thread from executing;
tracking an amount of time that the first lock during the execution of the first software thread prevents the second software thread from executing;
if the amount of time is greater than a threshold, storing, in a lock history table, the amount of time and the address of the first lock;
dispatching, after the first lock is cleared, a third software thread, wherein the third software thread comprises a second operation that attempts to execute a second lock at an address;
determining that the address of the second lock matches the address of the first lock stored in the lock history table;
executing the third software thread and the second lock at the address of the second lock; and
increasing the hardware priority of the third software thread during the second lock, wherein the increased hardware priority reduces the duration of the second lock.
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 an amount of time that a lock on a first thread prevents a second thread from execution. The method also includes, if the amount of time is greater than a first threshold, storing the amount of time and an address associated with the lock. The method includes dispatching a third thread that utilizes the address associated with the lock. The method also includes increasing the hardware priority of the third thread during a lock operation.
-
Citations
17 Claims
-
1. A method for managing lock contention in a processor, comprising:
-
executing a first software thread comprising a first operation which executes a first lock at an address of the first lock; receiving, during the execution of the first lock, a request from a second software thread comprising a load request to the address of the first lock, wherein the first lock prevents the second software thread from executing; tracking an amount of time that the first lock during the execution of the first software thread prevents the second software thread from executing; if the amount of time is greater than a threshold, storing, in a lock history table, the amount of time and the address of the first lock; dispatching, after the first lock is cleared, a third software thread, wherein the third software thread comprises a second operation that attempts to execute a second lock at an address; determining that the address of the second lock matches the address of the first lock stored in the lock history table; executing the third software thread and the second lock at the address of the second lock; and increasing the hardware priority of the third software thread during the second lock, wherein the increased hardware priority reduces the duration of the second lock. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. 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:
-
execute a first software thread comprising a first operation which executes a first lock at an address of the first lock; receive, during the execution of the first lock, a request from a second software thread comprising a load request to the address of the first lock, wherein the first lock prevents the second software thread from executing; track an amount of time that the first lock during the execution of the first software thread prevents the second software thread from executing; if the amount of time is greater than a threshold, store, in a lock history table, the amount of time and the address of the first lock; dispatch, after the first lock is cleared, a third software thread, wherein the third software thread comprises a second operation that attempts to execute a second lock at an address; determine that the address of the second lock matches the address of the first lock stored in the lock history table; execute the third software thread and the second lock at the address of the second lock; and increase the hardware priority of the third software thread during the second lock, wherein the increased hardware priority reduces the duration of the second lock. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. 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; executing a first software thread comprising a first operation which executes a first lock at an address of the first lock; receiving, during the execution of the first lock, a request from a second software thread comprising a load request to the address of the first lock, wherein the first lock prevents the second software thread from executing; tracking an amount of time that the first lock during the execution of the first software thread prevents the second software thread from executing; if the amount of time is greater than a threshold, storing, in a lock history table, the amount of time and the address of the first lock; dispatching, after the first lock is cleared, a third software thread, wherein the third software thread comprises a second operation that attempts to execute a second lock at an address; determining that the address of the second lock matches the address of the first lock stored in the lock history table; executing the third software thread and the second lock at the address of the second lock; and increasing the hardware priority of the third software thread during the second lock, wherein the increased hardware priority reduces the duration of the second lock. - View Dependent Claims (14, 15, 16, 17)
-
Specification