summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2018-08-12 14:59:33 +0200
committerRichard Braun <rbraun@sceen.net>2018-08-12 14:59:33 +0200
commitd50bbf0c7a73ee6f817535e9d0e7792ea7894a65 (patch)
treeaf3b5eebb6ea42dff6ab33a346ef9333c34814e3
parentd6d90a3276a09da65690b019e985392bf77b53b0 (diff)
kern/rcu: explain the need for separate work/reader window flips
-rw-r--r--kern/rcu.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/kern/rcu.c b/kern/rcu.c
index 6126a7a7..e4508f38 100644
--- a/kern/rcu.c
+++ b/kern/rcu.c
@@ -72,7 +72,20 @@
* |
* +-------------
*
- * TODO Explain the need for separate work/reader window flips.
+ * On each processor, work window flips are separate from reader window
+ * flips in order to correctly handle situations such as this one, where
+ * "wf" denotes a window flip for both works and readers :
+ *
+ * t ---->
+ *
+ * CPU0 wf load flush
+ * CPU1 wf flush
+ * global no-new-reader ... no-ref loaded value now invalid
+ *
+ * After its window flip, CPU0 may load data from the previous window with
+ * a reader linked to the current window, because it doesn't know that there
+ * may still be new works queued on the previous window.
+ *
* TODO Improve atomic acknowledgment scalability.
* TODO Handle large amounts of deferred works.
* TODO Priority boosting of slow readers.