US 11,748,174 B2
Method for arbitration and access to hardware request ring structures in a concurrent environment
Juraj Vanco, Trencin (SK); Conor McLoughlin, Limerick (IE); and John Browne, Limerick (IE)
Assigned to Intel Corporation, Santa Clara, CA (US)
Filed by Intel Corporation, Santa Clara, CA (US)
Filed on Oct. 2, 2019, as Appl. No. 16/590,490.
Prior Publication US 2020/0034214 A1, Jan. 30, 2020
Int. Cl. G06F 9/52 (2006.01); G06F 9/50 (2006.01); G06F 13/16 (2006.01); G06F 13/28 (2006.01)
CPC G06F 9/526 (2013.01) [G06F 9/5005 (2013.01); G06F 13/1663 (2013.01); G06F 13/28 (2013.01)] 23 Claims
OG exemplary drawing
 
1. A method comprising:
implementing a request ring in a portion of shared virtual memory (SVM) on a computing platform including a multi-core processor and one or more SVM-capable accelerators, the multi-core processor including a bus to which a plurality of processor cores are coupled;
receiving a plurality of requests to access the request ring from a plurality of worker threads concurrently executing on cores of the multi-core processor cores;
for a request that is received from a worker thread,
assigning, via a lockless arbiter without using software locks, an index of an available slot on the request ring and returning the index to the worker thread making the request;
implementing an atomic counter in a ring overflow guard;
in response to receiving requests from worker threads to access the request ring, for each request,
locking the bus,
incrementing the atomic counter;
unlocking the bus;
detecting, via the ring overflow guard, whether the request ring is full by determining whether a value of the atomic counter is greater than a threshold; and
when the value of the atomic counter is greater than the threshold,
locking the bus;
decrementing the atomic counter;
unlocking the bus; and
returning indicia to the worker thread that the request ring is full;
otherwise, when the value of the atomic counter is not greater than the threshold, returning an index of an available slot to the worker thread.