Method, apparatus, and computer program product for dynamically tuning a data processing system by identifying and boosting holders of contentious locks
First Claim
1. A method in a simultaneous multithreading data processing system for modifying the processing of multiple software threads that acquire a software lock, said method comprising:
- concurrently executing multiple software threads on a processor included in said data processing system;
assigning a hardware priority to each one of said multiple software threads;
identifying the software lock as a contentious lock by a first locking function;
boosting, by the first locking function, a hardware priority of each of said multiple software threads that successfully acquires said contentious lock;
identifying a command that was executed by one of the multiple software threads to branch to a second locking function;
tracking, by said second locking function, a number of times said one of the multiple software threads successfully acquires a lock on said first attempt to acquire said lock;
comparing, by said second locking function, said number of times to a non-contention threshold;
in response to said number of times exceeding said non-contention threshold, identifying said lock as a non-contentious lock;
in response to identifying said lock as the non-contentious lock, storing an address of said first locking function in said command; and
in response to a next execution of said command, branching to said first locking function instead of branching to said second locking function and continue executing the multiple software threads.
1 Assignment
0 Petitions
Accused Products
Abstract
A method, apparatus, and computer program product are disclosed for a simultaneous multithreading (SMT) data processing system for modifying the processing of software threads that acquire a contentious software lock. The system includes a processor that is capable of concurrently executing multiple different threads on the processor. The processor is also capable of utilizing hardware thread priorities assigned to each thread the processor is processing by granting a greater, disparate amount of resources to the highest priority thread. A hardware priority is assigned to each one of the SMT threads. A contentious lock is identified. Ones of the multiple threads are identified that attempt to acquire the contentious lock. These threads are dynamically redirected to special code for handling contentious locks. The hardware priority of a thread acquiring a contentious lock is then boosted. According to the preferred embodiment, the present invention redirects callers of a locking function to a “hot” locking function when the lock they are acquiring has been classified as “hot”, and vice versa.
-
Citations
12 Claims
-
1. A method in a simultaneous multithreading data processing system for modifying the processing of multiple software threads that acquire a software lock, said method comprising:
-
concurrently executing multiple software threads on a processor included in said data processing system; assigning a hardware priority to each one of said multiple software threads; identifying the software lock as a contentious lock by a first locking function; boosting, by the first locking function, a hardware priority of each of said multiple software threads that successfully acquires said contentious lock; identifying a command that was executed by one of the multiple software threads to branch to a second locking function; tracking, by said second locking function, a number of times said one of the multiple software threads successfully acquires a lock on said first attempt to acquire said lock; comparing, by said second locking function, said number of times to a non-contention threshold; in response to said number of times exceeding said non-contention threshold, identifying said lock as a non-contentious lock; in response to identifying said lock as the non-contentious lock, storing an address of said first locking function in said command; and in response to a next execution of said command, branching to said first locking function instead of branching to said second locking function and continue executing the multiple software threads. - View Dependent Claims (2, 3, 4, 10, 11)
-
-
5. An apparatus in a simultaneous multithreading data processing system for modifying the processing of multiple software threads that acquire a software lock, said apparatus comprising:
-
a processor concurrently executing multiple software threads; a hardware priority assigned to each one of said multiple software threads; a first locking function for identifying the software lock as a contentious lock; said first locking function boosting a hardware priority of each of said multiple software threads that successfully acquires said contentious lock; a second locking function for identifying a command that was executed by one of the multiple software threads to branch to a second locking function; said second locking function tracking a number of times said one of the multiple software threads successfully acquires a lock on said first attempt to acquire said lock; said second locking function comparing said number of times to a non-contention threshold; in response to said number of times exceeding said non-contention threshold, said second locking function identifying said lock as a non-contentious lock; in response to identifying said lock as a non-contentious lock, said second locking function storing an address of said first locking function in said command; and in response to a next execution of said command, said processor branching to said first locking function instead of branching to said second locking function. - View Dependent Claims (6, 7, 8)
-
-
9. A computer program product stored in a recordable-type media of simultaneous multithreading data processing system for modifying the processing of multiple software threads that acquire a software lock, said computer program product comprising:
-
instructions for concurrently executing multiple software threads on a processor included in said data processing system; instructions for assigning a hardware priority to each one of said multiple software threads; instructions for identifying the software lock as a contentious lock by a first locking function; instructions for boosting, by the first locking function, a hardware priority of each of said multiple software threads that successfully acquires said contentious lock; instructions for identifying a command that was executed by one of the multiple software threads to branch to a second locking function; instructions for tracking, by said second locking function, a number of times said one of the multiple software threads successfully acquires a lock on said first attempt to acquire said lock; instructions for comparing, by said second locking function, said number of times to a non-contention threshold; in response to said number of times exceeding said non-contention threshold, instructions for identifying said lock as a non-contentious lock; in response to identifying said lock as a non-contentious lock, instructions for storing an address of said first locking function in said command; and in response to a next execution of said command, instructions for branching to said first locking function instead of branching to said second locking function. - View Dependent Claims (12)
-
Specification