Fair high-throughput locking for expedited grace periods
First Claim
1. A method for detecting expedited read-copy update (RCU) grace periods using funnel locking with waitqueues, said method comprising:
- determining, by an RCU updater, a future expedited RCU grace period needed to guarantee that a full expedited RCU grace period has elapsed following a current expedited RCU grace period;
initiating, by said RCU updater, a leaf-to-root traversal of a funnel lock embodied as a hierarchical tree of nodes having a single top level root node, a plurality of bottom level leaf nodes, and zero or more intermediate level nodes;
for each node of said funnel lock accessed during said leaf-to-root traversal, checking an indicator to determine if another RCU updater needing said future expedited RCU grace period has visited said node;
if true, adding said RCU updater to a waitqueue of RCU updaters waiting for said future expedited RCU grace period;
if false, setting said indicator to indicate that said RCU updater needing said future expedited RCU grace period has visited said node, and continuing to a next node of said funnel lock;
if said RCU updater reaches said root node with no indication that any other RCU updater needing said future expedited RCU grace period has visited any of said nodes accessed by said RCU updater, then acquiring an expedited RCU grace period mutex lock that serializes expedited RCU grace period operations, starting a new expedited RCU grace period, waiting for said new expedited RCU grace period to elapse, releasing said expedited RCU grace period mutex lock, and initiating a wakeup operation that wakes up other RCU updaters waiting on waitqueues associated with said elapsed new expedited RCU grace period.
1 Assignment
0 Petitions
Accused Products
Abstract
An updater needing an expedited RCU grace period may initiate a leaf-to-root traversal of a funnel lock embodied as a hierarchical tree of nodes. For each accessed node, the updater may check an indicator to determine if another updater needing the same expedited grace period has visited the node. If true, the updater may add itself to a waitqueue of updaters waiting for the expedited RCU grace period. If false, the updater may set the indicator to indicate it has visited the node, and then continue to a next node. If the updater reaches the root node with no indication that any other updater needing the expedited RCU grace period has visited the nodes accessed by the updater, the updater may, while holding a mutex lock, start a new expedited RCU grace period and at the end thereof wake up other updaters waiting on the expedited RCU grace period.
-
Citations
20 Claims
-
1. A method for detecting expedited read-copy update (RCU) grace periods using funnel locking with waitqueues, said method comprising:
-
determining, by an RCU updater, a future expedited RCU grace period needed to guarantee that a full expedited RCU grace period has elapsed following a current expedited RCU grace period; initiating, by said RCU updater, a leaf-to-root traversal of a funnel lock embodied as a hierarchical tree of nodes having a single top level root node, a plurality of bottom level leaf nodes, and zero or more intermediate level nodes; for each node of said funnel lock accessed during said leaf-to-root traversal, checking an indicator to determine if another RCU updater needing said future expedited RCU grace period has visited said node; if true, adding said RCU updater to a waitqueue of RCU updaters waiting for said future expedited RCU grace period; if false, setting said indicator to indicate that said RCU updater needing said future expedited RCU grace period has visited said node, and continuing to a next node of said funnel lock; if said RCU updater reaches said root node with no indication that any other RCU updater needing said future expedited RCU grace period has visited any of said nodes accessed by said RCU updater, then acquiring an expedited RCU grace period mutex lock that serializes expedited RCU grace period operations, starting a new expedited RCU grace period, waiting for said new expedited RCU grace period to elapse, releasing said expedited RCU grace period mutex lock, and initiating a wakeup operation that wakes up other RCU updaters waiting on waitqueues associated with said elapsed new expedited RCU grace period. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A system, comprising:
-
a plurality of CPUs; a memory coupled to said CPUs, said memory including a computer readable storage medium tangibly embodying at least one program of instructions executable by said CPUs to perform operations for detecting expedited read-copy update (RCU) grace periods using funnel locking with waitqueues, said operations comprising; determining, by an RCU updater, a future expedited RCU grace period needed to guarantee that a full expedited RCU grace period has elapsed following a current expedited RCU grace period; initiating, by said RCU updater, a leaf-to-root traversal of a funnel lock embodied as a hierarchical tree of nodes having a single top level root node, a plurality of bottom level leaf nodes, and zero or more intermediate level nodes; for each node of said funnel lock accessed during said leaf-to-root traversal, checking an indicator to determine if another RCU updater needing said future expedited RCU grace period has visited said node; if true, adding said RCU updater to a waitqueue of RCU updaters waiting for said future expedited RCU grace period; if false, setting said indicator to indicate that said RCU updater needing said future expedited RCU grace period has visited said node, and continuing to a next node of said funnel lock; if said RCU updater reaches said root node with no indication that any other RCU updater needing said future expedited RCU grace period has visited any of said nodes accessed by said RCU updater, then acquiring an expedited RCU grace period mutex lock that serializes expedited RCU grace period operations, starting a new expedited RCU grace period, waiting for said new expedited RCU grace period to elapse, releasing said expedited RCU grace period mutex lock, and initiating a wakeup operation that wakes up other RCU updaters waiting on waitqueues associated with said elapsed new expedited RCU grace period. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A computer program product, comprising:
-
one or more computer readable data storage media; program instructions stored on said one or more computer readable data storage media for programming a data processing platform having a plurality of CPUs to perform operations for detecting expedited read-copy update (RCU) grace periods using funnel locking with waitqueues, said operations comprising; determining, by an RCU updater, a future expedited RCU grace period needed to guarantee that a full expedited RCU grace period has elapsed following a current expedited RCU grace period; initiating, by said RCU updater, a leaf-to-root traversal of a funnel lock embodied as a hierarchical tree of nodes having a single top level root node, a plurality of bottom level leaf nodes, and zero or more intermediate level nodes; for each node of said funnel lock accessed during said leaf-to-root traversal, checking an indicator to determine if another RCU updater needing said future expedited RCU grace period has visited said node; if true, adding said RCU updater to a waitqueue of RCU updaters waiting for said future expedited RCU grace period; if false, setting said indicator to indicate that said RCU updater needing said future expedited RCU grace period has visited said node, and continuing to a next node of said funnel lock; if said RCU updater reaches said root node with no indication that any other RCU updater needing said future expedited RCU grace period has visited any of said nodes accessed by said RCU updater, then acquiring an expedited RCU grace period mutex lock that serializes expedited RCU grace period operations, starting a new expedited RCU grace period, waiting for said new expedited RCU grace period to elapse, releasing said expedited RCU grace period mutex lock, and initiating a wakeup operation that wakes up other RCU updaters waiting on waitqueues associated with said elapsed new expedited RCU grace period. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification