Funnel locking for normal RCU grace period requests
First Claim
1. A computer-implemented method, comprising:
- calculating a future normal RCU grace period based on the status of a current RCU grace period;
initiating a traversal of a funnel lock embodied as a hierarchical tree of nodes having a single top level root node, one or more bottom level leaf nodes, and zero or more intermediate level nodes;
the funnel-lock traversal starting at an initial node whose node lock is held throughout the funnel-lock traversal;
for each node accessed during the funnel-lock traversal that is not the initial node, holding a node lock on the node while accessing that node;
for each node accessed during the funnel-lock traversal, checking future normal RCU grace period request information maintained by the node to determine whether a first condition exists wherein the future normal RCU grace period has already been requested at that node, and responsive to the first condition being determined to exist, terminating the funnel-lock traversal;
for each node accessed during the funnel-lock traversal, checking current normal RCU grace period information maintained by the node to determine whether a second condition exists wherein the future normal RCU grace period as already started, and responsive to the second condition being determined to exist, terminating the funnel-lock traversal;
for each node accessed during the funnel-lock traversal that is not the initial node, checking the current normal RCU grace period information maintained by the node to determine whether a third condition exists wherein any normal RCU grace period is currently underway, and responsive to the third condition being determined to exist, terminating the funnel-lock traversal; and
for each node accessed during the funnel-lock traversal wherein neither the first condition, the second condition, nor the third condition are determined to exist, updating the future normal RCU grace period request information maintained by the node to record a request for the future normal RCU grace period.
1 Assignment
0 Petitions
Accused Products
Abstract
A funnel locking technique for normal read-copy update (RCU) grace period requests. Based on a calculated future normal RCU grace period, a traversal is initiated of a funnel lock embodied as a hierarchical tree of nodes. The funnel-lock traversal starts at an initial node whose lock is held throughout the funnel-lock traversal. For each node accessed during the funnel-lock traversal that is not the initial node, a lock on the node is held while accessing that node. For each accessed node, the funnel-lock traversal is terminated if the future normal RCU grace period has already been requested at that node, if the node believes that the future normal RCU grace period as already started, or if the node is not the initial node and believes that any normal RCU grace period is underway. Otherwise, a request for the future normal RCU grace period is recorded at the node.
-
Citations
20 Claims
-
1. A computer-implemented method, comprising:
-
calculating a future normal RCU grace period based on the status of a current RCU grace period; initiating a traversal of a funnel lock embodied as a hierarchical tree of nodes having a single top level root node, one or more bottom level leaf nodes, and zero or more intermediate level nodes; the funnel-lock traversal starting at an initial node whose node lock is held throughout the funnel-lock traversal; for each node accessed during the funnel-lock traversal that is not the initial node, holding a node lock on the node while accessing that node; for each node accessed during the funnel-lock traversal, checking future normal RCU grace period request information maintained by the node to determine whether a first condition exists wherein the future normal RCU grace period has already been requested at that node, and responsive to the first condition being determined to exist, terminating the funnel-lock traversal; for each node accessed during the funnel-lock traversal, checking current normal RCU grace period information maintained by the node to determine whether a second condition exists wherein the future normal RCU grace period as already started, and responsive to the second condition being determined to exist, terminating the funnel-lock traversal; for each node accessed during the funnel-lock traversal that is not the initial node, checking the current normal RCU grace period information maintained by the node to determine whether a third condition exists wherein any normal RCU grace period is currently underway, and responsive to the third condition being determined to exist, terminating the funnel-lock traversal; and for each node accessed during the funnel-lock traversal wherein neither the first condition, the second condition, nor the third condition are determined to exist, updating the future normal RCU grace period request information maintained by the node to record a request for the future normal RCU grace period. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A system, comprising:
-
a plurality of processors; a computer readable storage medium; program instructions stored on the computer readable storage medium for execution by one or more of the processors to perform funnel-locking operations for normal read-copy update (RCU) grace period requests, the operations comprising; calculating a future normal RCU grace period based on the status of a current RCU grace period; initiating a traversal of a funnel lock embodied as a hierarchical tree of nodes having a single top level root node, one or more bottom level leaf nodes, and zero or more intermediate level nodes; the funnel-lock traversal starting at an initial node whose node lock is held throughout the funnel-lock traversal; for each node accessed during the funnel-lock traversal that is not the initial node, holding a node lock on the node while accessing that node; for each node accessed during the funnel-lock traversal, checking future normal RCU grace period request information maintained by the node to determine whether a first condition exists wherein the future normal RCU grace period has already been requested at that node, and responsive to the first condition being determined to exist, terminating the funnel-lock traversal; for each node accessed during the funnel-lock traversal, checking current normal RCU grace period information maintained by the node to determine whether a second condition exists wherein the future normal RCU grace period as already started, and responsive to the second condition being determined to exist, terminating the funnel-lock traversal; for each node accessed during the funnel-lock traversal that is not the initial node, checking the current normal RCU grace period information maintained by the node to determine whether a third condition exists wherein any normal RCU grace period is currently underway, and responsive to the third condition being determined to exist, terminating the funnel-lock traversal; and for each node accessed during the funnel-lock traversal wherein neither the first condition, the second condition, nor the third condition are determined to exist, updating the future normal RCU grace period request information maintained by the node to record a request for the future normal RCU grace period. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A computer program product, comprising:
-
a computer readable storage medium; program instructions stored on the computer readable storage medium for execution by a processor to perform funnel-locking operations for normal read-copy update (RCU) grace period requests, the operations comprising; calculating a future normal RCU grace period based on the status of a current RCU grace period; initiating a traversal of a funnel lock embodied as a hierarchical tree of nodes having a single top level root node, one or more bottom level leaf nodes, and zero or more intermediate level nodes; the funnel-lock traversal starting at an initial node whose node lock is held throughout the funnel-lock traversal; for each node accessed during the funnel-lock traversal that is not the initial node, holding a node lock on the node while accessing that node; for each node accessed during the funnel-lock traversal, checking future normal RCU grace period request information maintained by the node to determine whether a first condition exists wherein the future normal RCU grace period has already been requested at that node, and responsive to the first condition being determined to exist, terminating the funnel-lock traversal; for each node accessed during the funnel-lock traversal, checking current normal RCU grace period information maintained by the node to determine whether a second condition exists wherein the future normal RCU grace period as already started, and responsive to the second condition being determined to exist, terminating the funnel-lock traversal; for each node accessed during the funnel-lock traversal that is not the initial node, checking the current normal RCU grace period information maintained by the node to determine whether a third condition exists wherein any normal RCU grace period is currently underway, and responsive to the third condition being determined to exist, terminating the funnel-lock traversal; and for each node accessed during the funnel-lock traversal wherein neither the first condition, the second condition, nor the third condition are determined to exist, updating the future normal RCU grace period request information maintained by the node to record a request for the future normal RCU grace period. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification