This commit adds requirements documentation for the get_state_synchronize_srcu(), start_poll_synchronize_srcu(), and poll_state_synchronize_srcu() functions.
Unified · Split
| @@ -2600,6 +2600,24 @@ also includes ``DEFINE_SRCU()``, ``DEFINE_STATIC_SRCU()``, and · 2599 unmodified lines | ||
| 2600 | 2600 | ``init_srcu_struct()`` APIs for defining and initializing |
| 2601 | 2601 | ``srcu_struct`` structures. |
| 2602 | 2602 | |
| 2603 | +More recently, the SRCU API has added polling interfaces: | |
| 2604 | + | |
| 2605 | +#. start_poll_synchronize_srcu() returns a cookie identifying | |
| 2606 | + the completion of a future SRCU grace period and ensures | |
| 2607 | + that this grace period will be started. | |
| 2608 | +#. poll_state_synchronize_srcu() returns ``true`` iff the | |
| 2609 | + specified cookie corresponds to an already-completed | |
| 2610 | + SRCU grace period. | |
| 2611 | +#. get_state_synchronize_srcu() returns a cookie just like | |
| 2612 | + start_poll_synchronize_srcu() does, but differs in that | |
| 2613 | + it does nothing to ensure that any future SRCU grace period | |
| 2614 | + will be started. | |
| 2615 | + | |
| 2616 | +These functions are used to avoid unnecessary SRCU grace periods in | |
| 2617 | +certain types of buffer-cache algorithms having multi-stage age-out | |
| 2618 | +mechanisms. The idea is that by the time the block has aged completely | |
| 2619 | +from the cache, an SRCU grace period will be very likely to have elapsed. | |
| 2620 | + | |
| 2603 | 2621 | Tasks RCU |
| 2604 | 2622 | ~~~~~~~~~ |
| 2605 | 2623 | |