US 12,190,174 B2
Selective workgroup wake-up based on synchronization mechanism identification with high contention scenario
Alexandru Dutu, Bellevue, WA (US); Sergey Blagodurov, Bellevue, WA (US); Anthony T. Gutierrez, Bellevue, WA (US); Matthew D. Sinclair, Bellevue, WA (US); David A. Wood, Austin, TX (US); and Bradford M. Beckmann, Bellevue, WA (US)
Assigned to Advanced Micro Devices, Inc., Santa Clara, CA (US)
Filed by Advanced Micro Devices, Inc., Santa Clara, CA (US)
Filed on May 29, 2019, as Appl. No. 16/425,881.
Prior Publication US 2020/0379820 A1, Dec. 3, 2020
Int. Cl. G06F 9/52 (2006.01); G06F 9/48 (2006.01); G06F 11/30 (2006.01); G06F 11/34 (2006.01)
CPC G06F 9/522 (2013.01) [G06F 9/485 (2013.01); G06F 11/3024 (2013.01); G06F 11/3058 (2013.01); G06F 11/3495 (2013.01)] 17 Claims
OG exemplary drawing
 
1. A method for scheduling on an accelerated processing device (“APD”), the method comprising:
detecting execution of a wait instruction by each workgroup of a plurality of workgroups, wherein the wait instruction causes each workgroup of the plurality of workgroups to be in a waiting state, wherein the wait instruction executed by each workgroup of the plurality of workgroups specifies a condition variable and a condition to be met for the condition variable, wherein the condition variable and the condition of the wait instruction are the same for each workgroup;
monitoring the condition variable to detect when the condition is met;
in response to the condition being met as a result of only a single update to the condition variable after the wait instruction is executed by any workgroup of the plurality of workgroups, updating an estimated time of completion of a respective critical section associated with a synchronization primitive associated with the condition variable to completion of the critical section when the condition is met, and detecting that the plurality of workgroups is part of a high contention scenario indicating a mutual exclusion synchronization primitive;
while each workgroup of the plurality of workgroups is in the waiting state, waking up only a single workgroup of the plurality of the workgroups in response to the condition being met and in response to the plurality of workgroups being part of the high contention scenario indicating the mutual exclusion synchronization primitive; and
scheduling a second set including more than one workgroup to be woken up after the updated estimated time.