Making read-copy update free-running grace period counters safe against lengthy low power state sojourns
First Claim
1. In a computing system having at least two processors operatively coupled to a memory, a method for making a free-running grace period counter safe against lengthy low power state processor sojourns, comprising:
- periodically executing read operations on said processors to reference shared data in said memory;
periodically executing update operations on said processors to update said shared data in said memory;
periodically executing grace period detection operations on said processors in order to reclaim memory by removing stale data elements or to perform other operations;
said grace period detection operations using a grace period counter to track grace periods, said grace periods determining when said processors executing said read operations have passed through a quiescent state that guarantees said read operations can no longer maintain references to said shared data;
said grace period counter being a free-running counter having an initial count value that is incremented to start a new grace period until a maximum count value is reached and said counter rolls over to said initial count value;
said grace period detection operations further including said processors periodically referencing said grace period counter, storing a per-processor copy of said grace period counter'"'"'s current grace period count value, and performing quiescent state detection processing for each new grace period;
periodically placing one or more of said processors in a low power state in which said processors discontinue referencing said grace period counter and do not perform quiescent state detection processing;
said processors being capable of experiencing an operational scenario in which said processors remain in said low power state for a complete cycle of said grace period counter, and in which said processors enter said low power state at a first grace period count value and return to a full power state after said grace period counter has rolled over and returned to a rollover grace period count value that is the same as said first grace period count value;
said operational scenario causing potential disruption of said grace period detection operations if said processors assume from their stored grace period count value being the same as said rollover grace period count that a grace period associated with said first grace period count value is still in force; and
preventing said potential disruption by periodically waking said processors in said low power state at a predetermined point that is selected prevent said low power state from extending for a time that allows said grace period counter to roll over.
1 Assignment
0 Petitions
Accused Products
Abstract
A technique for making a free-running grace period counter safe against lengthy low power state processor sojourns. The grace period counter tracks grace periods that determine when processors that are capable executing read operations have passed through a quiescent state that guarantees the readers will no longer maintain references to shared data. Periodically, one or more processors may be placed in a low power state in which the processors discontinue performing grace period detection operations. Such processors may remain in the low power state for a complete cycle of the grace period counter. This scenario can potentially disrupt grace period detection operations if the processors awaken to see the same grace period counter value. To rectify this situation, processors in a low power state may be periodically awakened at a predetermined point selected prevent the low power state from extending for an entire roll over of the grace period counter.
72 Citations
20 Claims
-
1. In a computing system having at least two processors operatively coupled to a memory, a method for making a free-running grace period counter safe against lengthy low power state processor sojourns, comprising:
-
periodically executing read operations on said processors to reference shared data in said memory; periodically executing update operations on said processors to update said shared data in said memory; periodically executing grace period detection operations on said processors in order to reclaim memory by removing stale data elements or to perform other operations; said grace period detection operations using a grace period counter to track grace periods, said grace periods determining when said processors executing said read operations have passed through a quiescent state that guarantees said read operations can no longer maintain references to said shared data; said grace period counter being a free-running counter having an initial count value that is incremented to start a new grace period until a maximum count value is reached and said counter rolls over to said initial count value; said grace period detection operations further including said processors periodically referencing said grace period counter, storing a per-processor copy of said grace period counter'"'"'s current grace period count value, and performing quiescent state detection processing for each new grace period; periodically placing one or more of said processors in a low power state in which said processors discontinue referencing said grace period counter and do not perform quiescent state detection processing; said processors being capable of experiencing an operational scenario in which said processors remain in said low power state for a complete cycle of said grace period counter, and in which said processors enter said low power state at a first grace period count value and return to a full power state after said grace period counter has rolled over and returned to a rollover grace period count value that is the same as said first grace period count value; said operational scenario causing potential disruption of said grace period detection operations if said processors assume from their stored grace period count value being the same as said rollover grace period count that a grace period associated with said first grace period count value is still in force; and preventing said potential disruption by periodically waking said processors in said low power state at a predetermined point that is selected prevent said low power state from extending for a time that allows said grace period counter to roll over. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A system, comprising:
-
one or more processors; a memory coupled to said one or more processors, said memory including a computer useable medium tangibly embodying at least one program of instructions executable by said processor to perform operations for making a free-running grace period counter safe against lengthy low power state processor sojourns, said operations comprising; periodically executing read operations on said processors to reference shared data in said memory; periodically executing update operations on said processors to update said shared data in said memory; periodically executing grace period detection operations on said processors in order to reclaim memory by removing stale data elements or to perform other operations; said grace period detection operations using a grace period counter to track grace periods, said grace periods determining when said processors executing said read operations have passed through a quiescent state that guarantees said read operations can no longer maintain references to said shared data; said grace period counter being a free-running counter having an initial count value that is incremented to start a new grace period until a maximum count value is reached and said counter rolls over to said initial count value; said grace period detection operations further including said processors periodically referencing said grace period counter, storing a per-processor copy of said grace period counter'"'"'s current grace period count value, and performing quiescent state detection processing for each new grace period; periodically placing one or more of said processors in a low power state in which said processors discontinue referencing said grace period counter and do not perform quiescent state detection processing; said processors being capable of experiencing an operational scenario in which said processors remain in said low power state for a complete cycle of said grace period counter, and in which said processors enter said low power state at a first grace period count value and return to a full power state after said grace period counter has rolled over and returned to a rollover grace period count value that is the same as said first grace period count value; said operational scenario causing potential disruption of said grace period detection operations if said processors assume from their stored grace period count value being the same as said rollover grace period count that a grace period associated with said first grace period count value is still in force; and preventing said potential disruption by periodically waking said processors in said low power state at a predetermined point that is selected prevent said low power state from extending for a time that allows said grace period counter to roll over. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A computer program product, comprising:
-
one or more machine-useable storage media; program instructions provided by said one or more media for programming a data processing platform to perform operations for making a free-running grace period counter safe against lengthy low power state processor sojourns, said operations comprising; periodically executing read operations on said processors to reference said shared data in said memory; periodically executing update operations on said processors to update said shared data in said memory; periodically executing grace period detection operations on said processors in order to reclaim memory by removing stale data elements or to perform other operations; said grace period detection operations using a grace period counter to track grace periods, said grace periods determining when said processors executing said read operations have passed through a quiescent state that guarantees said read operations can no longer maintain references to said shared data; said grace period counter being a free-running counter having an initial count value that is incremented to start a new grace period until a maximum count value is reached and said counter rolls over to said initial count value; said grace period detection operations further including said processors periodically referencing said grace period counter, storing a per-processor copy of said grace period counter'"'"'s current grace period count value, and performing quiescent state detection processing for each new grace period; periodically placing one or more of said processors in a low power state in which said processors discontinue referencing said grace period counter and do not perform quiescent state detection processing; said processors being capable of experiencing an operational scenario in which said processors remain in said low power state for a complete cycle of said grace period counter, and in which said processors enter said low power state at a first grace period count value and return to a full power state after said grace period counter has rolled over and returned to a rollover grace period count value that is the same as said first grace period count value; said operational scenario causing potential disruption of said grace period detection operations if said processors assume from their stored grace period count value being the same as said rollover grace period count that a grace period associated with said first grace period count value is still in force; and preventing said potential disruption by periodically waking said processors in said low power state at a predetermined point that is selected prevent said low power state from extending for a time that allows said grace period counter to roll over. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification