Skip to content

Commit

Permalink
doc: Take tail recursion into account in RCU requirements
Browse files Browse the repository at this point in the history
This commit classifies tail recursion as an alternative way to write
a loop, with similar limitations.

Signed-off-by: Paul E. McKenney <[email protected]>
  • Loading branch information
paulmck committed Jun 8, 2017
1 parent 09f501a commit c75e9ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Documentation/RCU/Design/Requirements/Requirements.html
Original file line number Diff line number Diff line change
Expand Up @@ -1849,7 +1849,8 @@ <h3><a name="Composability">Composability</a></h3>
If the nesting is not visible to the compiler, as is the case with
mutually recursive functions each in its own translation unit,
stack overflow will result.
If the nesting takes the form of loops, either the control variable
If the nesting takes the form of loops, perhaps in the guise of tail
recursion, either the control variable
will overflow or (in the Linux kernel) you will get an RCU CPU stall warning.
Nevertheless, this class of RCU implementations is one
of the most composable constructs in existence.
Expand Down

0 comments on commit c75e9ca

Please sign in to comment.