code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   width="490.05093"
   height="125.78741"
   id="svg2"
   version="1.1"
   inkscape:version="0.48.4 r9939"
   sodipodi:docname="Funnel8.svg">
  <defs
     id="defs4">
    <marker
       inkscape:stockid="Arrow2Lend"
       orient="auto"
       refY="0"
       refX="0"
       id="Arrow2Lend"
       style="overflow:visible">
      <path
         id="path3792"
         style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
         transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
         inkscape:connector-curvature="0" />
    </marker>
    <marker
       inkscape:stockid="Arrow2Lstart"
       orient="auto"
       refY="0"
       refX="0"
       id="Arrow2Lstart"
       style="overflow:visible">
      <path
         id="path3789"
         style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
         transform="matrix(1.1,0,0,1.1,1.1,0)"
         inkscape:connector-curvature="0" />
    </marker>
    <marker
       inkscape:stockid="Arrow2Lstart"
       orient="auto"
       refY="0"
       refX="0"
       id="Arrow2Lstart-4"
       style="overflow:visible">
      <path
         id="path3789-9"
         style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
         transform="matrix(1.1,0,0,1.1,1.1,0)"
         inkscape:connector-curvature="0" />
    </marker>
    <marker
       inkscape:stockid="Arrow2Lend"
       orient="auto"
       refY="0"
       refX="0"
       id="Arrow2Lend-4"
       style="overflow:visible">
      <path
         id="path3792-4"
         style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
         transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
         inkscape:connector-curvature="0" />
    </marker>
  </defs>
  <sodipodi:namedview
     id="base"
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1.0"
     inkscape:pageopacity="0.0"
     inkscape:pageshadow="2"
     inkscape:zoom="1.3670394"
     inkscape:cx="114.01552"
     inkscape:cy="-86.548414"
     inkscape:document-units="px"
     inkscape:current-layer="layer1"
     showgrid="false"
     inkscape:window-width="1351"
     inkscape:window-height="836"
     inkscape:window-x="68"
     inkscape:window-y="180"
     inkscape:window-maximized="0"
     fit-margin-top="5"
     fit-margin-left="5"
     fit-margin-right="5"
     fit-margin-bottom="5" />
  <metadata
     id="metadata7">
    <rdf:RDF>
      <cc:Work
         rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type
           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
        <dc:title />
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <g
     inkscape:label="Layer 1"
     inkscape:groupmode="layer"
     id="layer1"
     transform="translate(-117.08462,-249.92053)">
    <flowRoot
       xml:space="preserve"
       id="flowRoot2985"
       style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:monospace;-inkscape-font-specification:monospace"><flowRegion
         id="flowRegion2987"><rect
           id="rect2989"
           width="82.85714"
           height="11.428572"
           x="240"
           y="492.36218" /></flowRegion><flowPara
         id="flowPara2991" /></flowRoot>    <text
       xml:space="preserve"
       style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:monospace;-inkscape-font-specification:monospace"
       x="362.371"
       y="262.51819"
       id="text4441"
       sodipodi:linespacing="125%"><tspan
         sodipodi:role="line"
         id="tspan4443"
         x="362.371"
         y="262.51819">->expedited_sequence: 3  GP: E,H</tspan></text>
    <rect
       style="fill:none;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
       id="rect3101"
       width="43.158947"
       height="26.33428"
       x="253.55223"
       y="275.07489" />
    <rect
       style="fill:#ff8282;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;fill-opacity:1"
       id="rect3101-3"
       width="43.158947"
       height="26.33428"
       x="297.04141"
       y="275.07489" />
    <rect
       style="fill:#ff8282;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
       id="rect3101-3-6"
       width="43.158947"
       height="26.33428"
       x="427.509"
       y="275.07489" />
    <rect
       style="fill:#ff8282;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;fill-opacity:1"
       id="rect3101-3-6-7"
       width="43.158947"
       height="26.33428"
       x="384.01981"
       y="275.07489" />
    <rect
       style="fill:#ff8282;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;fill-opacity:1"
       id="rect3101-3-6-7-5"
       width="43.158947"
       height="26.33428"
       x="340.53061"
       y="275.07489" />
    <g
       id="g3997"
       transform="translate(-0.87295532,0)">
      <rect
         y="343.37366"
         x="123.95757"
         height="26.33428"
         width="43.158947"
         id="rect3101-35"
         style="fill:none;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
      <rect
         y="343.37366"
         x="167.44673"
         height="26.33428"
         width="43.158947"
         id="rect3101-3-62"
         style="fill:#ff8282;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;fill-opacity:1" />
      <rect
         y="343.37366"
         x="297.91437"
         height="26.33428"
         width="43.158947"
         id="rect3101-3-6-9"
         style="fill:#ff8282;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;fill-opacity:1" />
      <rect
         y="343.37366"
         x="254.42516"
         height="26.33428"
         width="43.158947"
         id="rect3101-3-6-7-1"
         style="fill:#ff8282;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;fill-opacity:1" />
      <rect
         y="343.37366"
         x="210.93593"
         height="26.33428"
         width="43.158947"
         id="rect3101-3-6-7-5-2"
         style="fill:#ff8282;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;fill-opacity:1" />
      <text
         xml:space="preserve"
         style="font-size:20px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
         x="146.00092"
         y="360.25174"
         id="text3013"
         sodipodi:linespacing="125%"><tspan
           sodipodi:role="line"
           id="tspan3015"
           x="146.00092"
           y="360.25174"
           style="font-size:10px">:4</tspan></text>
    </g>
    <g
       id="g3019"
       transform="translate(260.06223,0)">
      <rect
         y="343.37366"
         x="123.95757"
         height="26.33428"
         width="43.158947"
         id="rect3101-35-0"
         style="fill:none;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
      <rect
         y="343.37366"
         x="167.44673"
         height="26.33428"
         width="43.158947"
         id="rect3101-3-62-9"
         style="fill:#ff8282;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
      <rect
         y="343.37366"
         x="297.91437"
         height="26.33428"
         width="43.158947"
         id="rect3101-3-6-9-3"
         style="fill:#ff8282;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
      <rect
         y="343.37366"
         x="254.42516"
         height="26.33428"
         width="43.158947"
         id="rect3101-3-6-7-1-6"
         style="fill:#ff8282;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
      <rect
         y="343.37366"
         x="210.93593"
         height="26.33428"
         width="43.158947"
         id="rect3101-3-6-7-5-2-0"
         style="fill:#ff8282;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
      <text
         xml:space="preserve"
         style="font-size:20px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
         x="145.54926"
         y="360.25174"
         id="text3013-3"
         sodipodi:linespacing="125%"><tspan
           sodipodi:role="line"
           id="tspan3015-6"
           x="145.54926"
           y="360.25174"
           style="font-size:10px">:6</tspan></text>
    </g>
    <text
       xml:space="preserve"
       style="font-size:20px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
       x="275.59558"
       y="291.95297"
       id="text3013-36"
       sodipodi:linespacing="125%"><tspan
         sodipodi:role="line"
         id="tspan3015-7"
         x="275.59558"
         y="291.95297"
         style="font-size:10px">:6</tspan></text>
    <text
       xml:space="preserve"
       style="font-size:20px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
       x="405.40396"
       y="291.88705"
       id="text3013-3-36-3"
       sodipodi:linespacing="125%"><tspan
         sodipodi:role="line"
         id="tspan3015-6-7-6"
         x="405.40396"
         y="291.88705"
         style="font-size:10px">F</tspan></text>
    <text
       xml:space="preserve"
       style="font-size:20px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
       x="449.22031"
       y="291.88217"
       id="text3013-3-36-3-3"
       sodipodi:linespacing="125%"><tspan
         sodipodi:role="line"
         id="tspan3015-6-7-6-6"
         x="449.22031"
         y="291.88217"
         style="font-size:10px">G</tspan></text>
  </g>
</svg>


code:
======================================================
A Tour Through TREE_RCU's Grace-Period Memory Ordering
======================================================

August 8, 2017

This article was contributed by Paul E. McKenney

Introduction
============

This document gives a rough visual overview of how Tree RCU's
grace-period memory ordering guarantee is provided.

What Is Tree RCU's Grace Period Memory Ordering Guarantee?
==========================================================

RCU grace periods provide extremely strong memory-ordering guarantees
for non-idle non-offline code.
Any code that happens after the end of a given RCU grace period is guaranteed
to see the effects of all accesses prior to the beginning of that grace
period that are within RCU read-side critical sections.
Similarly, any code that happens before the beginning of a given RCU grace
period is guaranteed to not see the effects of all accesses following the end
of that grace period that are within RCU read-side critical sections.

Note well that RCU-sched read-side critical sections include any region
of code for which preemption is disabled.
Given that each individual machine instruction can be thought of as
an extremely small region of preemption-disabled code, one can think of
``synchronize_rcu()`` as ``smp_mb()`` on steroids.

RCU updaters use this guarantee by splitting their updates into
two phases, one of which is executed before the grace period and
the other of which is executed after the grace period.
In the most common use case, phase one removes an element from
a linked RCU-protected data structure, and phase two frees that element.
For this to work, any readers that have witnessed state prior to the
phase-one update (in the common case, removal) must not witness state
following the phase-two update (in the common case, freeing).

The RCU implementation provides this guarantee using a network
of lock-based critical sections, memory barriers, and per-CPU
processing, as is described in the following sections.

Tree RCU Grace Period Memory Ordering Building Blocks
=====================================================

The workhorse for RCU's grace-period memory ordering is the
critical section for the ``rcu_node`` structure's
``->lock``. These critical sections use helper functions for lock
acquisition, including ``raw_spin_lock_rcu_node()``,
``raw_spin_lock_irq_rcu_node()``, and ``raw_spin_lock_irqsave_rcu_node()``.
Their lock-release counterparts are ``raw_spin_unlock_rcu_node()``,
``raw_spin_unlock_irq_rcu_node()``, and
``raw_spin_unlock_irqrestore_rcu_node()``, respectively.
For completeness, a ``raw_spin_trylock_rcu_node()`` is also provided.
The key point is that the lock-acquisition functions, including
``raw_spin_trylock_rcu_node()``, all invoke ``smp_mb__after_unlock_lock()``
immediately after successful acquisition of the lock.

Therefore, for any given ``rcu_node`` structure, any access
happening before one of the above lock-release functions will be seen
by all CPUs as happening before any access happening after a later
one of the above lock-acquisition functions.
Furthermore, any access happening before one of the
above lock-release function on any given CPU will be seen by all
CPUs as happening before any access happening after a later one
of the above lock-acquisition functions executing on that same CPU,
even if the lock-release and lock-acquisition functions are operating
on different ``rcu_node`` structures.
Tree RCU uses these two ordering guarantees to form an ordering
network among all CPUs that were in any way involved in the grace
period, including any CPUs that came online or went offline during
the grace period in question.

The following litmus test exhibits the ordering effects of these
lock-acquisition and lock-release functions::

    1 int x, y, z;
    2
    3 void task0(void)
    4 {
    5   raw_spin_lock_rcu_node(rnp);
    6   WRITE_ONCE(x, 1);
    7   r1 = READ_ONCE(y);
    8   raw_spin_unlock_rcu_node(rnp);
    9 }
   10
   11 void task1(void)
   12 {
   13   raw_spin_lock_rcu_node(rnp);
   14   WRITE_ONCE(y, 1);
   15   r2 = READ_ONCE(z);
   16   raw_spin_unlock_rcu_node(rnp);
   17 }
   18
   19 void task2(void)
   20 {
   21   WRITE_ONCE(z, 1);
   22   smp_mb();
   23   r3 = READ_ONCE(x);
   24 }
   25
   26 WARN_ON(r1 == 0 && r2 == 0 && r3 == 0);

The ``WARN_ON()`` is evaluated at "the end of time",
after all changes have propagated throughout the system.
Without the ``smp_mb__after_unlock_lock()`` provided by the
acquisition functions, this ``WARN_ON()`` could trigger, for example
on PowerPC.
The ``smp_mb__after_unlock_lock()`` invocations prevent this
``WARN_ON()`` from triggering.

+-----------------------------------------------------------------------+
| **Quick Quiz**:                                                       |
+-----------------------------------------------------------------------+
| But the chain of rcu_node-structure lock acquisitions guarantees      |
| that new readers will see all of the updater's pre-grace-period       |
| accesses and also guarantees that the updater's post-grace-period     |
| accesses will see all of the old reader's accesses.  So why do we     |
| need all of those calls to smp_mb__after_unlock_lock()?               |
+-----------------------------------------------------------------------+
| **Answer**:                                                           |
+-----------------------------------------------------------------------+
| Because we must provide ordering for RCU's polling grace-period       |
| primitives, for example, get_state_synchronize_rcu() and              |
| poll_state_synchronize_rcu().  Consider this code::                   |
|                                                                       |
|  CPU 0                                     CPU 1                      |
|  ----                                      ----                       |
|  WRITE_ONCE(X, 1)                          WRITE_ONCE(Y, 1)           |
|  g = get_state_synchronize_rcu()           smp_mb()                   |
|  while (!poll_state_synchronize_rcu(g))    r1 = READ_ONCE(X)          |
|          continue;                                                    |
|  r0 = READ_ONCE(Y)                                                    |
|                                                                       |
| RCU guarantees that the outcome r0 == 0 && r1 == 0 will not           |
| happen, even if CPU 1 is in an RCU extended quiescent state           |
| (idle or offline) and thus won't interact directly with the RCU       |
| core processing at all.                                               |
+-----------------------------------------------------------------------+

This approach must be extended to include idle CPUs, which need
RCU's grace-period memory ordering guarantee to extend to any
RCU read-side critical sections preceding and following the current
idle sojourn.
This case is handled by calls to the strongly ordered
``atomic_add_return()`` read-modify-write atomic operation that
is invoked within ``rcu_dynticks_eqs_enter()`` at idle-entry
time and within ``rcu_dynticks_eqs_exit()`` at idle-exit time.
The grace-period kthread invokes ``rcu_dynticks_snap()`` and
``rcu_dynticks_in_eqs_since()`` (both of which invoke
an ``atomic_add_return()`` of zero) to detect idle CPUs.

+-----------------------------------------------------------------------+
| **Quick Quiz**:                                                       |
+-----------------------------------------------------------------------+
| But what about CPUs that remain offline for the entire grace period?  |
+-----------------------------------------------------------------------+
| **Answer**:                                                           |
+-----------------------------------------------------------------------+
| Such CPUs will be offline at the beginning of the grace period, so    |
| the grace period won't expect quiescent states from them. Races       |
| between grace-period start and CPU-hotplug operations are mediated    |
| by the CPU's leaf ``rcu_node`` structure's ``->lock`` as described    |
| above.                                                                |
+-----------------------------------------------------------------------+

The approach must be extended to handle one final case, that of waking a
task blocked in ``synchronize_rcu()``. This task might be affinitied to
a CPU that is not yet aware that the grace period has ended, and thus
might not yet be subject to the grace period's memory ordering.
Therefore, there is an ``smp_mb()`` after the return from
``wait_for_completion()`` in the ``synchronize_rcu()`` code path.

+-----------------------------------------------------------------------+
| **Quick Quiz**:                                                       |
+-----------------------------------------------------------------------+
| What? Where??? I don't see any ``smp_mb()`` after the return from     |
| ``wait_for_completion()``!!!                                          |
+-----------------------------------------------------------------------+
| **Answer**:                                                           |
+-----------------------------------------------------------------------+
| That would be because I spotted the need for that ``smp_mb()`` during |
| the creation of this documentation, and it is therefore unlikely to   |
| hit mainline before v4.14. Kudos to Lance Roy, Will Deacon, Peter     |
| Zijlstra, and Jonathan Cameron for asking questions that sensitized   |
| me to the rather elaborate sequence of events that demonstrate the    |
| need for this memory barrier.                                         |
+-----------------------------------------------------------------------+

Tree RCU's grace--period memory-ordering guarantees rely most heavily on
the ``rcu_node`` structure's ``->lock`` field, so much so that it is
necessary to abbreviate this pattern in the diagrams in the next
section. For example, consider the ``rcu_prepare_for_idle()`` function
shown below, which is one of several functions that enforce ordering of
newly arrived RCU callbacks against future grace periods:

::

    1 static void rcu_prepare_for_idle(void)
    2 {
    3   bool needwake;
    4   struct rcu_data *rdp = this_cpu_ptr(&rcu_data);
    5   struct rcu_node *rnp;
    6   int tne;
    7
    8   lockdep_assert_irqs_disabled();
    9   if (rcu_rdp_is_offloaded(rdp))
   10     return;
   11
   12   /* Handle nohz enablement switches conservatively. */
   13   tne = READ_ONCE(tick_nohz_active);
   14   if (tne != rdp->tick_nohz_enabled_snap) {
   15     if (!rcu_segcblist_empty(&rdp->cblist))
   16       invoke_rcu_core(); /* force nohz to see update. */
   17     rdp->tick_nohz_enabled_snap = tne;
   18     return;
   19	}
   20   if (!tne)
   21     return;
   22
   23   /*
   24    * If we have not yet accelerated this jiffy, accelerate all
   25    * callbacks on this CPU.
   26   */
   27   if (rdp->last_accelerate == jiffies)
   28     return;
   29   rdp->last_accelerate = jiffies;
   30   if (rcu_segcblist_pend_cbs(&rdp->cblist)) {
   31     rnp = rdp->mynode;
   32     raw_spin_lock_rcu_node(rnp); /* irqs already disabled. */
   33     needwake = rcu_accelerate_cbs(rnp, rdp);
   34     raw_spin_unlock_rcu_node(rnp); /* irqs remain disabled. */
   35     if (needwake)
   36       rcu_gp_kthread_wake();
   37   }
   38 }

But the only part of ``rcu_prepare_for_idle()`` that really matters for
this discussion are lines 32–34. We will therefore abbreviate this
function as follows:

.. kernel-figure:: rcu_node-lock.svg

The box represents the ``rcu_node`` structure's ``->lock`` critical
section, with the double line on top representing the additional
``smp_mb__after_unlock_lock()``.

Tree RCU Grace Period Memory Ordering Components
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Tree RCU's grace-period memory-ordering guarantee is provided by a
number of RCU components:

#. `Callback Registry`_
#. `Grace-Period Initialization`_
#. `Self-Reported Quiescent States`_
#. `Dynamic Tick Interface`_
#. `CPU-Hotplug Interface`_
#. `Forcing Quiescent States`_
#. `Grace-Period Cleanup`_
#. `Callback Invocation`_

Each of the following section looks at the corresponding component in
detail.

Callback Registry
^^^^^^^^^^^^^^^^^

If RCU's grace-period guarantee is to mean anything at all, any access
that happens before a given invocation of ``call_rcu()`` must also
happen before the corresponding grace period. The implementation of this
portion of RCU's grace period guarantee is shown in the following
figure:

.. kernel-figure:: TreeRCU-callback-registry.svg

Because ``call_rcu()`` normally acts only on CPU-local state, it
provides no ordering guarantees, either for itself or for phase one of
the update (which again will usually be removal of an element from an
RCU-protected data structure). It simply enqueues the ``rcu_head``
structure on a per-CPU list, which cannot become associated with a grace
period until a later call to ``rcu_accelerate_cbs()``, as shown in the
diagram above.

One set of code paths shown on the left invokes ``rcu_accelerate_cbs()``
via ``note_gp_changes()``, either directly from ``call_rcu()`` (if the
current CPU is inundated with queued ``rcu_head`` structures) or more
likely from an ``RCU_SOFTIRQ`` handler. Another code path in the middle
is taken only in kernels built with ``CONFIG_RCU_FAST_NO_HZ=y``, which
invokes ``rcu_accelerate_cbs()`` via ``rcu_prepare_for_idle()``. The
final code path on the right is taken only in kernels built with
``CONFIG_HOTPLUG_CPU=y``, which invokes ``rcu_accelerate_cbs()`` via
``rcu_advance_cbs()``, ``rcu_migrate_callbacks``,
``rcutree_migrate_callbacks()``, and ``takedown_cpu()``, which in turn
is invoked on a surviving CPU after the outgoing CPU has been completely
offlined.

There are a few other code paths within grace-period processing that
opportunistically invoke ``rcu_accelerate_cbs()``. However, either way,
all of the CPU's recently queued ``rcu_head`` structures are associated
with a future grace-period number under the protection of the CPU's lead
``rcu_node`` structure's ``->lock``. In all cases, there is full
ordering against any prior critical section for that same ``rcu_node``
structure's ``->lock``, and also full ordering against any of the
current task's or CPU's prior critical sections for any ``rcu_node``
structure's ``->lock``.

The next section will show how this ordering ensures that any accesses
prior to the ``call_rcu()`` (particularly including phase one of the
update) happen before the start of the corresponding grace period.

+-----------------------------------------------------------------------+
| **Quick Quiz**:                                                       |
+-----------------------------------------------------------------------+
| But what about ``synchronize_rcu()``?                                 |
+-----------------------------------------------------------------------+
| **Answer**:                                                           |
+-----------------------------------------------------------------------+
| The ``synchronize_rcu()`` passes ``call_rcu()`` to ``wait_rcu_gp()``, |
| which invokes it. So either way, it eventually comes down to          |
| ``call_rcu()``.                                                       |
+-----------------------------------------------------------------------+

Grace-Period Initialization
^^^^^^^^^^^^^^^^^^^^^^^^^^^

Grace-period initialization is carried out by the grace-period kernel
thread, which makes several passes over the ``rcu_node`` tree within the
``rcu_gp_init()`` function. This means that showing the full flow of
ordering through the grace-period computation will require duplicating
this tree. If you find this confusing, please note that the state of the
``rcu_node`` changes over time, just like Heraclitus's river. However,
to keep the ``rcu_node`` river tractable, the grace-period kernel
thread's traversals are presented in multiple parts, starting in this
section with the various phases of grace-period initialization.

The first ordering-related grace-period initialization action is to
advance the ``rcu_state`` structure's ``->gp_seq`` grace-period-number
counter, as shown below:

.. kernel-figure:: TreeRCU-gp-init-1.svg

The actual increment is carried out using ``smp_store_release()``, which
helps reject false-positive RCU CPU stall detection. Note that only the
root ``rcu_node`` structure is touched.

The first pass through the ``rcu_node`` tree updates bitmasks based on
CPUs having come online or gone offline since the start of the previous
grace period. In the common case where the number of online CPUs for
this ``rcu_node`` structure has not transitioned to or from zero, this
pass will scan only the leaf ``rcu_node`` structures. However, if the
number of online CPUs for a given leaf ``rcu_node`` structure has
transitioned from zero, ``rcu_init_new_rnp()`` will be invoked for the
first incoming CPU. Similarly, if the number of online CPUs for a given
leaf ``rcu_node`` structure has transitioned to zero,
``rcu_cleanup_dead_rnp()`` will be invoked for the last outgoing CPU.
The diagram below shows the path of ordering if the leftmost
``rcu_node`` structure onlines its first CPU and if the next
``rcu_node`` structure has no online CPUs (or, alternatively if the
leftmost ``rcu_node`` structure offlines its last CPU and if the next
``rcu_node`` structure has no online CPUs).

.. kernel-figure:: TreeRCU-gp-init-2.svg

The final ``rcu_gp_init()`` pass through the ``rcu_node`` tree traverses
breadth-first, setting each ``rcu_node`` structure's ``->gp_seq`` field
to the newly advanced value from the ``rcu_state`` structure, as shown
in the following diagram.

.. kernel-figure:: TreeRCU-gp-init-3.svg

This change will also cause each CPU's next call to
``__note_gp_changes()`` to notice that a new grace period has started,
as described in the next section. But because the grace-period kthread
started the grace period at the root (with the advancing of the
``rcu_state`` structure's ``->gp_seq`` field) before setting each leaf
``rcu_node`` structure's ``->gp_seq`` field, each CPU's observation of
the start of the grace period will happen after the actual start of the
grace period.

+-----------------------------------------------------------------------+
| **Quick Quiz**:                                                       |
+-----------------------------------------------------------------------+
| But what about the CPU that started the grace period? Why wouldn't it |
| see the start of the grace period right when it started that grace    |
| period?                                                               |
+-----------------------------------------------------------------------+
| **Answer**:                                                           |
+-----------------------------------------------------------------------+
| In some deep philosophical and overly anthromorphized sense, yes, the |
| CPU starting the grace period is immediately aware of having done so. |
| However, if we instead assume that RCU is not self-aware, then even   |
| the CPU starting the grace period does not really become aware of the |
| start of this grace period until its first call to                    |
| ``__note_gp_changes()``. On the other hand, this CPU potentially gets |
| early notification because it invokes ``__note_gp_changes()`` during  |
| its last ``rcu_gp_init()`` pass through its leaf ``rcu_node``         |
| structure.                                                            |
+-----------------------------------------------------------------------+

Self-Reported Quiescent States
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

When all entities that might block the grace period have reported
quiescent states (or as described in a later section, had quiescent
states reported on their behalf), the grace period can end. Online
non-idle CPUs report their own quiescent states, as shown in the
following diagram:

.. kernel-figure:: TreeRCU-qs.svg

This is for the last CPU to report a quiescent state, which signals the
end of the grace period. Earlier quiescent states would push up the
``rcu_node`` tree only until they encountered an ``rcu_node`` structure
that is waiting for additional quiescent states. However, ordering is
nevertheless preserved because some later quiescent state will acquire
that ``rcu_node`` structure's ``->lock``.

Any number of events can lead up to a CPU invoking ``note_gp_changes``
(or alternatively, directly invoking ``__note_gp_changes()``), at which
point that CPU will notice the start of a new grace period while holding
its leaf ``rcu_node`` lock. Therefore, all execution shown in this
diagram happens after the start of the grace period. In addition, this
CPU will consider any RCU read-side critical section that started before
the invocation of ``__note_gp_changes()`` to have started before the
grace period, and thus a critical section that the grace period must
wait on.

+-----------------------------------------------------------------------+
| **Quick Quiz**:                                                       |
+-----------------------------------------------------------------------+
| But a RCU read-side critical section might have started after the     |
| beginning of the grace period (the advancing of ``->gp_seq`` from     |
| earlier), so why should the grace period wait on such a critical      |
| section?                                                              |
+-----------------------------------------------------------------------+
| **Answer**:                                                           |
+-----------------------------------------------------------------------+
| It is indeed not necessary for the grace period to wait on such a     |
| critical section. However, it is permissible to wait on it. And it is |
| furthermore important to wait on it, as this lazy approach is far     |
| more scalable than a “big bang” all-at-once grace-period start could  |
| possibly be.                                                          |
+-----------------------------------------------------------------------+

If the CPU does a context switch, a quiescent state will be noted by
``rcu_note_context_switch()`` on the left. On the other hand, if the CPU
takes a scheduler-clock interrupt while executing in usermode, a
quiescent state will be noted by ``rcu_sched_clock_irq()`` on the right.
Either way, the passage through a quiescent state will be noted in a
per-CPU variable.

The next time an ``RCU_SOFTIRQ`` handler executes on this CPU (for
example, after the next scheduler-clock interrupt), ``rcu_core()`` will
invoke ``rcu_check_quiescent_state()``, which will notice the recorded
quiescent state, and invoke ``rcu_report_qs_rdp()``. If
``rcu_report_qs_rdp()`` verifies that the quiescent state really does
apply to the current grace period, it invokes ``rcu_report_rnp()`` which
traverses up the ``rcu_node`` tree as shown at the bottom of the
diagram, clearing bits from each ``rcu_node`` structure's ``->qsmask``
field, and propagating up the tree when the result is zero.

Note that traversal passes upwards out of a given ``rcu_node`` structure
only if the current CPU is reporting the last quiescent state for the
subtree headed by that ``rcu_node`` structure. A key point is that if a
CPU's traversal stops at a given ``rcu_node`` structure, then there will
be a later traversal by another CPU (or perhaps the same one) that
proceeds upwards from that point, and the ``rcu_node`` ``->lock``
guarantees that the first CPU's quiescent state happens before the
remainder of the second CPU's traversal. Applying this line of thought
repeatedly shows that all CPUs' quiescent states happen before the last
CPU traverses through the root ``rcu_node`` structure, the “last CPU”
being the one that clears the last bit in the root ``rcu_node``
structure's ``->qsmask`` field.

Dynamic Tick Interface
^^^^^^^^^^^^^^^^^^^^^^

Due to energy-efficiency considerations, RCU is forbidden from
disturbing idle CPUs. CPUs are therefore required to notify RCU when
entering or leaving idle state, which they do via fully ordered
value-returning atomic operations on a per-CPU variable. The ordering
effects are as shown below:

.. kernel-figure:: TreeRCU-dyntick.svg

The RCU grace-period kernel thread samples the per-CPU idleness variable
while holding the corresponding CPU's leaf ``rcu_node`` structure's
``->lock``. This means that any RCU read-side critical sections that
precede the idle period (the oval near the top of the diagram above)
will happen before the end of the current grace period. Similarly, the
beginning of the current grace period will happen before any RCU
read-side critical sections that follow the idle period (the oval near
the bottom of the diagram above).

Plumbing this into the full grace-period execution is described
`below <Forcing Quiescent States_>`__.

CPU-Hotplug Interface
^^^^^^^^^^^^^^^^^^^^^

RCU is also forbidden from disturbing offline CPUs, which might well be
powered off and removed from the system completely. CPUs are therefore
required to notify RCU of their comings and goings as part of the
corresponding CPU hotplug operations. The ordering effects are shown
below:

.. kernel-figure:: TreeRCU-hotplug.svg

Because CPU hotplug operations are much less frequent than idle
transitions, they are heavier weight, and thus acquire the CPU's leaf
``rcu_node`` structure's ``->lock`` and update this structure's
``->qsmaskinitnext``. The RCU grace-period kernel thread samples this
mask to detect CPUs having gone offline since the beginning of this
grace period.

Plumbing this into the full grace-period execution is described
`below <Forcing Quiescent States_>`__.

Forcing Quiescent States
^^^^^^^^^^^^^^^^^^^^^^^^

As noted above, idle and offline CPUs cannot report their own quiescent
states, and therefore the grace-period kernel thread must do the
reporting on their behalf. This process is called “forcing quiescent
states”, it is repeated every few jiffies, and its ordering effects are
shown below:

.. kernel-figure:: TreeRCU-gp-fqs.svg

Each pass of quiescent state forcing is guaranteed to traverse the leaf
``rcu_node`` structures, and if there are no new quiescent states due to
recently idled and/or offlined CPUs, then only the leaves are traversed.
However, if there is a newly offlined CPU as illustrated on the left or
a newly idled CPU as illustrated on the right, the corresponding
quiescent state will be driven up towards the root. As with
self-reported quiescent states, the upwards driving stops once it
reaches an ``rcu_node`` structure that has quiescent states outstanding
from other CPUs.

+-----------------------------------------------------------------------+
| **Quick Quiz**:                                                       |
+-----------------------------------------------------------------------+
| The leftmost drive to root stopped before it reached the root         |
| ``rcu_node`` structure, which means that there are still CPUs         |
| subordinate to that structure on which the current grace period is    |
| waiting. Given that, how is it possible that the rightmost drive to   |
| root ended the grace period?                                          |
+-----------------------------------------------------------------------+
| **Answer**:                                                           |
+-----------------------------------------------------------------------+
| Good analysis! It is in fact impossible in the absence of bugs in     |
| RCU. But this diagram is complex enough as it is, so simplicity       |
| overrode accuracy. You can think of it as poetic license, or you can  |
| think of it as misdirection that is resolved in the                   |
| `stitched-together diagram <Putting It All Together_>`__.             |
+-----------------------------------------------------------------------+

Grace-Period Cleanup
^^^^^^^^^^^^^^^^^^^^

Grace-period cleanup first scans the ``rcu_node`` tree breadth-first
advancing all the ``->gp_seq`` fields, then it advances the
``rcu_state`` structure's ``->gp_seq`` field. The ordering effects are
shown below:

.. kernel-figure:: TreeRCU-gp-cleanup.svg

As indicated by the oval at the bottom of the diagram, once grace-period
cleanup is complete, the next grace period can begin.

+-----------------------------------------------------------------------+
| **Quick Quiz**:                                                       |
+-----------------------------------------------------------------------+
| But when precisely does the grace period end?                         |
+-----------------------------------------------------------------------+
| **Answer**:                                                           |
+-----------------------------------------------------------------------+
| There is no useful single point at which the grace period can be said |
| to end. The earliest reasonable candidate is as soon as the last CPU  |
| has reported its quiescent state, but it may be some milliseconds     |
| before RCU becomes aware of this. The latest reasonable candidate is  |
| once the ``rcu_state`` structure's ``->gp_seq`` field has been        |
| updated, but it is quite possible that some CPUs have already         |
| completed phase two of their updates by that time. In short, if you   |
| are going to work with RCU, you need to learn to embrace uncertainty. |
+-----------------------------------------------------------------------+

Callback Invocation
^^^^^^^^^^^^^^^^^^^

Once a given CPU's leaf ``rcu_node`` structure's ``->gp_seq`` field has
been updated, that CPU can begin invoking its RCU callbacks that were
waiting for this grace period to end. These callbacks are identified by
``rcu_advance_cbs()``, which is usually invoked by
``__note_gp_changes()``. As shown in the diagram below, this invocation
can be triggered by the scheduling-clock interrupt
(``rcu_sched_clock_irq()`` on the left) or by idle entry
(``rcu_cleanup_after_idle()`` on the right, but only for kernels build
with ``CONFIG_RCU_FAST_NO_HZ=y``). Either way, ``RCU_SOFTIRQ`` is
raised, which results in ``rcu_do_batch()`` invoking the callbacks,
which in turn allows those callbacks to carry out (either directly or
indirectly via wakeup) the needed phase-two processing for each update.

.. kernel-figure:: TreeRCU-callback-invocation.svg

Please note that callback invocation can also be prompted by any number
of corner-case code paths, for example, when a CPU notes that it has
excessive numbers of callbacks queued. In all cases, the CPU acquires
its leaf ``rcu_node`` structure's ``->lock`` before invoking callbacks,
which preserves the required ordering against the newly completed grace
period.

However, if the callback function communicates to other CPUs, for
example, doing a wakeup, then it is that function's responsibility to
maintain ordering. For example, if the callback function wakes up a task
that runs on some other CPU, proper ordering must in place in both the
callback function and the task being awakened. To see why this is
important, consider the top half of the `grace-period
cleanup`_ diagram. The callback might be
running on a CPU corresponding to the leftmost leaf ``rcu_node``
structure, and awaken a task that is to run on a CPU corresponding to
the rightmost leaf ``rcu_node`` structure, and the grace-period kernel
thread might not yet have reached the rightmost leaf. In this case, the
grace period's memory ordering might not yet have reached that CPU, so
again the callback function and the awakened task must supply proper
ordering.

Putting It All Together
~~~~~~~~~~~~~~~~~~~~~~~

A stitched-together diagram is here:

.. kernel-figure:: TreeRCU-gp.svg

Legal Statement
~~~~~~~~~~~~~~~

This work represents the view of the author and does not necessarily
represent the view of IBM.

Linux is a registered trademark of Linus Torvalds.

Other company, product, and service names may be trademarks or service
marks of others.

repo_name: angery/linux


code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Creator: fig2dev Version 3.2 Patchlevel 5e -->

<!-- CreationDate: Wed Dec  9 17:35:03 2015 -->

<!-- Magnification: 2.000 -->

<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   width="592.12805"
   height="469.83038"
   viewBox="-44 -44 7874.1949 6244.9802"
   id="svg2"
   version="1.1"
   inkscape:version="0.48.4 r9939"
   sodipodi:docname="TreeRCU-callback-invocation.svg">
  <metadata
     id="metadata212">
    <rdf:RDF>
      <cc:Work
         rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type
           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
        <dc:title />
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <defs
     id="defs210">
    <marker
       inkscape:stockid="Arrow1Send"
       orient="auto"
       refY="0"
       refX="0"
       id="Arrow1Send"
       style="overflow:visible">
      <path
         id="path3940"
         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
         transform="matrix(-0.2,0,0,-0.2,-1.2,0)"
         inkscape:connector-curvature="0" />
    </marker>
    <marker
       inkscape:stockid="TriangleOutS"
       orient="auto"
       refY="0"
       refX="0"
       id="TriangleOutS"
       style="overflow:visible">
      <path
         id="path4073"
         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
         transform="scale(0.2,0.2)"
         inkscape:connector-curvature="0" />
    </marker>
    <marker
       inkscape:stockid="TriangleOutM"
       orient="auto"
       refY="0"
       refX="0"
       id="TriangleOutM"
       style="overflow:visible">
      <path
         id="path4070"
         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
         transform="scale(0.4,0.4)"
         inkscape:connector-curvature="0" />
    </marker>
    <marker
       inkscape:stockid="Arrow2Mend"
       orient="auto"
       refY="0"
       refX="0"
       id="Arrow2Mend"
       style="overflow:visible">
      <path
         id="path3952"
         style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
         transform="scale(-0.6,-0.6)"
         inkscape:connector-curvature="0" />
    </marker>
    <marker
       inkscape:stockid="Arrow2Lend"
       orient="auto"
       refY="0"
       refX="0"
       id="Arrow2Lend"
       style="overflow:visible">
      <path
         id="path3946"
         style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
         transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
         inkscape:connector-curvature="0" />
    </marker>
    <marker
       inkscape:stockid="Arrow1Mend"
       orient="auto"
       refY="0"
       refX="0"
       id="Arrow1Mend"
       style="overflow:visible">
      <path
         id="path3970"
         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
         transform="matrix(-0.4,0,0,-0.4,-4,0)"
         inkscape:connector-curvature="0" />
    </marker>
    <marker
       inkscape:stockid="Arrow2Mend"
       orient="auto"
       refY="0"
       refX="0"
       id="Arrow2Mend-7"
       style="overflow:visible">
      <path
         inkscape:connector-curvature="0"
         id="path3952-0"
         style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
         transform="scale(-0.6,-0.6)" />
    </marker>
    <marker
       inkscape:stockid="Arrow1Send"
       orient="auto"
       refY="0"
       refX="0"
       id="Arrow1Send-3"
       style="overflow:visible">
      <path
         inkscape:connector-curvature="0"
         id="path3940-6"
         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
         transform="matrix(-0.2,0,0,-0.2,-1.2,0)" />
    </marker>
    <marker
       inkscape:stockid="Arrow1Send"
       orient="auto"
       refY="0"
       refX="0"
       id="Arrow1Send-1"
       style="overflow:visible">
      <path
         inkscape:connector-curvature="0"
         id="path3940-2"
         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
         transform="matrix(-0.2,0,0,-0.2,-1.2,0)" />
    </marker>
    <marker
       inkscape:stockid="Arrow1Send"
       orient="auto"
       refY="0"
       refX="0"
       id="Arrow1Send-0"
       style="overflow:visible">
      <path
         inkscape:connector-curvature="0"
         id="path3940-9"
         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
         transform="matrix(-0.2,0,0,-0.2,-1.2,0)" />
    </marker>
  </defs>
  <sodipodi:namedview
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1"
     objecttolerance="10"
     gridtolerance="10"
     guidetolerance="10"
     inkscape:pageopacity="0"
     inkscape:pageshadow="2"
     inkscape:window-width="1087"
     inkscape:window-height="1144"
     id="namedview208"
     showgrid="true"
     inkscape:zoom="1.2009216"
     inkscape:cx="289.88715"
     inkscape:cy="219.06265"
     inkscape:window-x="713"
     inkscape:window-y="28"
     inkscape:window-maximized="0"
     inkscape:current-layer="g3058"
     fit-margin-top="5"
     fit-margin-right="5"
     fit-margin-left="5"
     fit-margin-bottom="5">
    <inkscape:grid
       type="xygrid"
       id="grid3079"
       empspacing="5"
       visible="true"
       enabled="true"
       snapvisiblegridlinesonly="true"
       originx="-116.00011px"
       originy="-87.2081px" />
  </sodipodi:namedview>
  <g
     style="fill:none;stroke-width:0.025in"
     id="g4"
     transform="translate(-2296.0293,-2364.1166)">
    <path
       style="fill:none;stroke:#969696;stroke-width:53.19251633;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Send)"
       d="m 6161.6776,2411.7612 0,4920.3076"
       id="path3134-9-0-3"
       inkscape:connector-curvature="0"
       sodipodi:nodetypes="cc" />
    <path
       style="fill:none;stroke:#969696;stroke-width:53.19251633;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Send)"
       d="m 6161.6776,4672.443 -2393.6631,0.5116 0,1196.8316 2393.6631,-0.5116"
       id="path3134-9-0"
       inkscape:connector-curvature="0"
       sodipodi:nodetypes="cccc" />
    <path
       style="fill:none;stroke:#969696;stroke-width:53.19251633;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Send)"
       d="m 6161.6776,4672.443 2393.6631,0.5116 0,1196.8316 -2393.6631,-0.5116"
       id="path3134-9-0-7"
       inkscape:connector-curvature="0"
       sodipodi:nodetypes="cccc" />
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 5250 8100 - 5710 5790-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 4050 9300 - 4512 7140-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 1040 9300 - 1502 7140-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 2240 8100 - 2702 5940-->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 1350 3450 - 2444 2510-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 4950 3450 - 3854 2510-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 4050 6600 - 4050 4290-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 1050 6600 - 1050 4290-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 2250 5400 - 2250 4290-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 2250 8100 - 2250 6240-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 1050 9300 - 1050 7440-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 4050 9300 - 4050 7440-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 5250 8100 - 5250 6240-->
    <!-- Circle -->
    <!-- Circle -->
    <!-- Circle -->
    <!-- Circle -->
    <!-- Circle -->
    <!-- Circle -->
    <!-- Circle -->
    <!-- Circle -->
    <!-- Circle -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line -->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 9300 3150 - 10860 3150-->
    <!-- Line: box -->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 11400 3600 - 11400 4410-->
    <!-- Line: box -->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 11400 5100 - 11400 5910-->
    <!-- Line: box -->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 9900 4650 - 10860 4650-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 9600 6150 - 10860 6150-->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 5250 5400 - 5250 4290-->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <rect
       x="2333.5203"
       y="5109.5566"
       width="2844.0974"
       height="360.77411"
       rx="0"
       style="fill:none;stroke:#000000;stroke-width:30.00057983;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:30.0005789, 60.00115781;stroke-dashoffset:0"
       id="rect118-3"
       ry="0" />
    <text
       xml:space="preserve"
       x="2562.135"
       y="5357.9937"
       font-style="normal"
       font-weight="bold"
       font-size="192"
       id="text202-7-5"
       style="font-size:192px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier">rcu_sched_clock_irq()</text>
    <rect
       x="7069.6187"
       y="5087.4678"
       width="2975.115"
       height="382.86298"
       rx="0"
       style="fill:none;stroke:#000000;stroke-width:30.00057983;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:30.00057902, 60.00115804;stroke-dashoffset:0"
       id="rect118-36"
       ry="0" />
    <text
       xml:space="preserve"
       x="7165.2524"
       y="5333.4927"
       font-style="normal"
       font-weight="bold"
       font-size="192"
       id="text202-7-9-6"
       style="font-size:192px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier">rcu_cleanup_after_idle()</text>
    <g
       id="g3058"
       transform="translate(-53.192514,-2819.2063)">
      <text
         style="font-size:192px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;font-family:Courier"
         id="text202"
         font-size="192"
         font-weight="bold"
         font-style="normal"
         y="6532.0293"
         x="5073.3374"
         xml:space="preserve">rcu_advance_cbs()</text>
      <rect
         id="rect112"
         style="stroke:#000000;stroke-width:30;stroke-linecap:butt;stroke-linejoin:miter"
         rx="0"
         height="1370.8721"
         width="2809.1992"
         y="5650.2598"
         x="4800.2563" />
      <rect
         id="rect112-3"
         style="fill:none;stroke:#000000;stroke-width:30;stroke-linecap:butt;stroke-linejoin:miter"
         rx="0"
         height="1294.8468"
         width="2809.1992"
         y="5726.2852"
         x="4800.2563" />
      <text
         sodipodi:linespacing="125%"
         style="font-size:192px;font-style:normal;font-weight:bold;line-height:125%;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier"
         id="text202-7-5-1-2-3-7"
         font-size="192"
         font-weight="bold"
         font-style="normal"
         y="6961.395"
         x="7220.106"
         xml:space="preserve"><tspan
           id="tspan3104-6-5"
           style="font-size:159.57754517px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Liberation Sans;-inkscape-font-specification:Liberation Sans">Leaf</tspan></text>
      <text
         style="font-size:192px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier"
         id="text202-3"
         font-size="192"
         font-weight="bold"
         font-style="normal"
         y="6321.9248"
         x="5073.3374"
         xml:space="preserve">__note_gp_changes()</text>
    </g>
    <g
       id="g3049"
       transform="translate(26.596257,6090.5512)">
      <path
         transform="matrix(13.298129,0,0,13.298129,1872.6808,-2726.4833)"
         d="m 385.2961,345.54001 c 0,21.84301 -29.51209,39.55026 -65.9171,39.55026 -36.40501,0 -65.91711,-17.70725 -65.91711,-39.55026 0,-21.84301 29.5121,-39.55026 65.91711,-39.55026 36.40501,0 65.9171,17.70725 65.9171,39.55026 z"
         sodipodi:ry="39.550262"
         sodipodi:rx="65.917107"
         sodipodi:cy="345.54001"
         sodipodi:cx="319.379"
         id="path3084-3"
         style="fill:#ffffa1;fill-opacity:0;stroke:#000000;stroke-width:2.25600004;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:2.256, 4.512;stroke-dashoffset:0"
         sodipodi:type="arc" />
      <text
         sodipodi:linespacing="125%"
         style="font-size:192px;font-style:normal;font-weight:bold;line-height:125%;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier"
         id="text202-7-5-1-2-6"
         font-size="192"
         font-weight="bold"
         font-style="normal"
         y="1785.2073"
         x="5717.4517"
         xml:space="preserve"><tspan
           id="tspan3104-7"
           style="font-size:159.57754517px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Liberation Sans;-inkscape-font-specification:Liberation Sans">Phase Two</tspan></text>
      <text
         sodipodi:linespacing="125%"
         id="text3110-5"
         y="2005.6624"
         x="6119.668"
         style="font-size:159.57754517px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
         xml:space="preserve"><tspan
           y="2005.6624"
           x="6119.668"
           id="tspan3112-3"
           sodipodi:role="line">of Update</tspan></text>
    </g>
    <rect
       x="5097.8271"
       y="6268.2183"
       width="1994.7195"
       height="664.90662"
       rx="0"
       style="fill:none;stroke:#000000;stroke-width:30.00057793;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:30.00057858, 60.00115716;stroke-dashoffset:0"
       id="rect118-36-3"
       ry="0" />
    <text
       xml:space="preserve"
       x="5363.7886"
       y="6534.1812"
       font-style="normal"
       font-weight="bold"
       font-size="192"
       id="text202-7-9-6-6"
       style="font-size:192px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier">RCU_SOFTIRQ</text>
    <text
       xml:space="preserve"
       x="5363.7886"
       y="6800.1436"
       font-style="normal"
       font-weight="bold"
       font-size="192"
       id="text202-7-9-6-6-7"
       style="font-size:192px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier">rcu_do_batch()</text>
  </g>
</svg>


code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Creator: fig2dev Version 3.2 Patchlevel 5e -->

<!-- CreationDate: Wed Dec  9 17:35:03 2015 -->

<!-- Magnification: 2.000 -->

<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   width="816.04761"
   height="636.55627"
   viewBox="-44 -44 10851.906 8461.0989"
   id="svg2"
   version="1.1"
   inkscape:version="0.48.4 r9939"
   sodipodi:docname="TreeRCU-callback-registry.svg">
  <metadata
     id="metadata212">
    <rdf:RDF>
      <cc:Work
         rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type
           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
        <dc:title />
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <defs
     id="defs210">
    <marker
       inkscape:stockid="Arrow1Send"
       orient="auto"
       refY="0"
       refX="0"
       id="Arrow1Send"
       style="overflow:visible">
      <path
         id="path3940"
         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
         transform="matrix(-0.2,0,0,-0.2,-1.2,0)"
         inkscape:connector-curvature="0" />
    </marker>
    <marker
       inkscape:stockid="TriangleOutS"
       orient="auto"
       refY="0"
       refX="0"
       id="TriangleOutS"
       style="overflow:visible">
      <path
         id="path4073"
         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
         transform="scale(0.2,0.2)"
         inkscape:connector-curvature="0" />
    </marker>
    <marker
       inkscape:stockid="TriangleOutM"
       orient="auto"
       refY="0"
       refX="0"
       id="TriangleOutM"
       style="overflow:visible">
      <path
         id="path4070"
         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
         transform="scale(0.4,0.4)"
         inkscape:connector-curvature="0" />
    </marker>
    <marker
       inkscape:stockid="Arrow2Mend"
       orient="auto"
       refY="0"
       refX="0"
       id="Arrow2Mend"
       style="overflow:visible">
      <path
         id="path3952"
         style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
         transform="scale(-0.6,-0.6)"
         inkscape:connector-curvature="0" />
    </marker>
    <marker
       inkscape:stockid="Arrow2Lend"
       orient="auto"
       refY="0"
       refX="0"
       id="Arrow2Lend"
       style="overflow:visible">
      <path
         id="path3946"
         style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
         transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
         inkscape:connector-curvature="0" />
    </marker>
    <marker
       inkscape:stockid="Arrow1Mend"
       orient="auto"
       refY="0"
       refX="0"
       id="Arrow1Mend"
       style="overflow:visible">
      <path
         id="path3970"
         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
         transform="matrix(-0.4,0,0,-0.4,-4,0)"
         inkscape:connector-curvature="0" />
    </marker>
    <marker
       inkscape:stockid="Arrow2Mend"
       orient="auto"
       refY="0"
       refX="0"
       id="Arrow2Mend-7"
       style="overflow:visible">
      <path
         inkscape:connector-curvature="0"
         id="path3952-0"
         style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
         transform="scale(-0.6,-0.6)" />
    </marker>
    <marker
       inkscape:stockid="Arrow1Send"
       orient="auto"
       refY="0"
       refX="0"
       id="Arrow1Send-3"
       style="overflow:visible">
      <path
         inkscape:connector-curvature="0"
         id="path3940-6"
         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
         transform="matrix(-0.2,0,0,-0.2,-1.2,0)" />
    </marker>
    <marker
       inkscape:stockid="Arrow1Send"
       orient="auto"
       refY="0"
       refX="0"
       id="Arrow1Send-1"
       style="overflow:visible">
      <path
         inkscape:connector-curvature="0"
         id="path3940-2"
         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
         transform="matrix(-0.2,0,0,-0.2,-1.2,0)" />
    </marker>
    <marker
       inkscape:stockid="Arrow1Send"
       orient="auto"
       refY="0"
       refX="0"
       id="Arrow1Send-0"
       style="overflow:visible">
      <path
         inkscape:connector-curvature="0"
         id="path3940-9"
         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
         transform="matrix(-0.2,0,0,-0.2,-1.2,0)" />
    </marker>
  </defs>
  <sodipodi:namedview
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1"
     objecttolerance="10"
     gridtolerance="10"
     guidetolerance="10"
     inkscape:pageopacity="0"
     inkscape:pageshadow="2"
     inkscape:window-width="1087"
     inkscape:window-height="1144"
     id="namedview208"
     showgrid="true"
     inkscape:zoom="1.2009216"
     inkscape:cx="408.02381"
     inkscape:cy="254.38856"
     inkscape:window-x="713"
     inkscape:window-y="28"
     inkscape:window-maximized="0"
     inkscape:current-layer="g4"
     fit-margin-top="5"
     fit-margin-right="5"
     fit-margin-left="5"
     fit-margin-bottom="5">
    <inkscape:grid
       type="xygrid"
       id="grid3079"
       empspacing="5"
       visible="true"
       enabled="true"
       snapvisiblegridlinesonly="true"
       originx="5.2596966e-08px"
       originy="-4.5963961e-06px" />
  </sodipodi:namedview>
  <g
     style="fill:none;stroke-width:0.025in"
     id="g4"
     transform="translate(-753.44492,-1306.6788)">
    <path
       style="fill:none;stroke:#969696;stroke-width:53.19251633;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Send)"
       d="m 6161.6776,2411.7612 0,6117.1391"
       id="path3134-9-0-3"
       inkscape:connector-curvature="0"
       sodipodi:nodetypes="cc" />
    <path
       style="fill:none;stroke:#969696;stroke-width:53.19251633;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Send)"
       d="m 6161.6776,3342.6302 -3856.4573,0 10.6979,5757.1962 2918.1436,-2e-4"
       id="path3134-9-0"
       inkscape:connector-curvature="0"
       sodipodi:nodetypes="cccc" />
    <path
       style="fill:none;stroke:#969696;stroke-width:53.19251633;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Send)"
       d="m 6161.6776,3342.6302 3856.4574,0 -12.188,5757.1963 -2918.1436,-3e-4"
       id="path3134-9-0-7"
       inkscape:connector-curvature="0"
       sodipodi:nodetypes="cccc" />
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 5250 8100 - 5710 5790-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 4050 9300 - 4512 7140-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 1040 9300 - 1502 7140-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 2240 8100 - 2702 5940-->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 1350 3450 - 2444 2510-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 4950 3450 - 3854 2510-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 4050 6600 - 4050 4290-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 1050 6600 - 1050 4290-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 2250 5400 - 2250 4290-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 2250 8100 - 2250 6240-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 1050 9300 - 1050 7440-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 4050 9300 - 4050 7440-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 5250 8100 - 5250 6240-->
    <!-- Circle -->
    <!-- Circle -->
    <!-- Circle -->
    <!-- Circle -->
    <!-- Circle -->
    <!-- Circle -->
    <!-- Circle -->
    <!-- Circle -->
    <!-- Circle -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line -->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 9300 3150 - 10860 3150-->
    <!-- Line: box -->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 11400 3600 - 11400 4410-->
    <!-- Line: box -->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 11400 5100 - 11400 5910-->
    <!-- Line: box -->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 9900 4650 - 10860 4650-->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 9600 6150 - 10860 6150-->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Line -->
    <!-- Arrowhead on XXXpoint 5250 5400 - 5250 4290-->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Line: box -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <!-- Text -->
    <rect
       x="4544.7305"
       y="4603.417"
       width="3240.0088"
       height="2650.6289"
       rx="0"
       style="stroke:#000000;stroke-width:30.00057793;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:30.00057884, 60.00115769;stroke-dashoffset:0"
       id="rect118"
       ry="0" />
    <text
       xml:space="preserve"
       x="5073.3374"
       y="6372.4521"
       font-style="normal"
       font-weight="bold"
       font-size="192"
       id="text202"
       style="font-size:192px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;font-family:Courier">rcu_accelerate_cbs()</text>
    <g
       id="g3107"
       transform="translate(2715.7065,4700.8888)">
      <rect
         id="rect112"
         style="stroke:#000000;stroke-width:30;stroke-linecap:butt;stroke-linejoin:miter"
         rx="0"
         height="1370.8721"
         width="2809.1992"
         y="949.37109"
         x="2084.55" />
      <rect
         id="rect112-3"
         style="fill:none;stroke:#000000;stroke-width:30;stroke-linecap:butt;stroke-linejoin:miter"
         rx="0"
         height="1294.8468"
         width="2809.1992"
         y="1025.3964"
         x="2084.55" />
    </g>
    <text
       xml:space="preserve"
       x="4773.3452"
       y="4825.2578"
       font-style="normal"
       font-weight="bold"
       font-size="192"
       id="text202-7"
       style="font-size:192px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier">rcu_prepare_for_idle()</text>
    <rect
       x="790.93585"
       y="4630.8252"
       width="3240.0088"
       height="2650.6289"
       rx="0"
       style="fill:none;stroke:#000000;stroke-width:30.00057983;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:30.0005789, 60.00115781;stroke-dashoffset:0"
       id="rect118-3"
       ry="0" />
    <text
       xml:space="preserve"
       x="1319.5447"
       y="6639.2261"
       font-style="normal"
       font-weight="bold"
       font-size="192"
       id="text202-6"
       style="font-size:192px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier">rcu_accelerate_cbs()</text>
    <g
       style="fill:none;stroke-width:0.025in"
       id="g3107-7"
       transform="translate(-1038.0776,4728.2971)">
      <rect
         id="rect112-5"
         style="stroke:#000000;stroke-width:30;stroke-linecap:butt;stroke-linejoin:miter"
         rx="0"
         height="1370.8721"
         width="2809.1992"
         y="949.37109"
         x="2084.55" />
      <rect
         id="rect112-3-3"
         style="fill:none;stroke:#000000;stroke-width:30;stroke-linecap:butt;stroke-linejoin:miter"
         rx="0"
         height="1294.8468"
         width="2809.1992"
         y="1025.3964"
         x="2084.55" />
    </g>
    <text
       xml:space="preserve"
       x="1019.5512"
       y="4852.666"
       font-style="normal"
       font-weight="bold"
       font-size="192"
       id="text202-7-5"
       style="font-size:192px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier">note_gp_changes()</text>
    <text
       xml:space="preserve"
       x="1319.5447"
       y="6376.6328"
       font-style="normal"
       font-weight="bold"
       font-size="192"
       id="text202-6-6"
       style="font-size:192px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier">rcu_advance_cbs()</text>
    <text
       xml:space="preserve"
       x="1340.6649"
       y="6111.4473"
       font-style="normal"
       font-weight="bold"
       font-size="192"
       id="text202-6-6-2"
       style="font-size:192px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier">__note_gp_changes()</text>
    <rect
       x="5422.6279"
       y="3041.8311"
       width="1480.4871"
       height="379.24637"
       rx="0"
       style="fill:none;stroke:#000000;stroke-width:30.00057983;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:30.0005789, 60.00115794;stroke-dashoffset:0"
       id="rect118-3-9"
       ry="0" />
    <text
       xml:space="preserve"
       x="5607.2734"
       y="3283.3892"
       font-style="normal"
       font-weight="bold"
       font-size="192"
       id="text202-7-5-1"
       style="font-size:192px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier">call_rcu()</text>
    <path
       sodipodi:type="arc"
       style="fill:#ffffa1;fill-opacity:0;stroke:#000000;stroke-width:2.25600004;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:2.256, 4.512;stroke-dashoffset:0"
       id="path3084"
       sodipodi:cx="319.379"
       sodipodi:cy="345.54001"
       sodipodi:rx="65.917107"
       sodipodi:ry="39.550262"
       d="m 385.2961,345.54001 c 0,21.84301 -29.51209,39.55026 -65.9171,39.55026 -36.40501,0 -65.91711,-17.70725 -65.91711,-39.55026 0,-21.84301 29.5121,-39.55026 65.91711,-39.55026 36.40501,0 65.9171,17.70725 65.9171,39.55026 z"
       transform="matrix(13.298129,0,0,13.298129,1915.7286,4523.6528)" />
    <text
       xml:space="preserve"
       x="5853.9238"
       y="8902.3623"
       font-style="normal"
       font-weight="bold"
       font-size="192"
       id="text202-7-5-1-2"
       style="font-size:192px;font-style:normal;font-weight:bold;line-height:125%;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier"
       sodipodi:linespacing="125%"><tspan
         style="font-size:159.57754517px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Liberation Sans;-inkscape-font-specification:Liberation Sans"
         id="tspan3104">Wake up</tspan></text>
    <text
       xml:space="preserve"
       style="font-size:159.57754517px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
       x="6165.7158"
       y="9122.8174"
       id="text3110"
       sodipodi:linespacing="125%"><tspan
         sodipodi:role="line"
         id="tspan3112"
         x="6165.7158"
         y="9122.8174">grace-period</tspan></text>
    <text
       xml:space="preserve"
       style="font-size:159.57754517px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
       x="6162.8716"
       y="9364.3564"
       id="text3114"
       sodipodi:linespacing="125%"><tspan
         sodipodi:role="line"
         id="tspan3116"
         x="6162.8716"
         y="9364.3564">kernel thread</tspan></text>
    <rect
       x="8239.8516"
       y="4608.7363"
       width="3240.0088"
       height="2650.6289"
       rx="0"
       style="fill:none;stroke:#000000;stroke-width:30.00057983;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:30.00057902, 60.00115804;stroke-dashoffset:0"
       id="rect118-36"
       ry="0" />
    <text
       xml:space="preserve"
       x="8768.4678"
       y="6484.1562"
       font-style="normal"
       font-weight="bold"
       font-size="192"
       id="text202-75"
       style="font-size:192px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier">rcu_accelerate_cbs()</text>
    <g
       style="fill:none;stroke-width:0.025in"
       id="g3107-3"
       transform="translate(6410.833,4706.2127)">
      <rect
         id="rect112-56"
         style="stroke:#000000;stroke-width:30;stroke-linecap:butt;stroke-linejoin:miter"
         rx="0"
         height="1370.8721"
         width="2809.1992"
         y="949.37109"
         x="2084.55" />
      <rect
         id="rect112-3-2"
         style="fill:none;stroke:#000000;stroke-width:30;stroke-linecap:butt;stroke-linejoin:miter"
         rx="0"
         height="1294.8468"
         width="2809.1992"
         y="1025.3964"
         x="2084.55" />
    </g>
    <text
       xml:space="preserve"
       x="8329.5352"
       y="4830.5771"
       font-style="normal"
       font-weight="bold"
       font-size="192"
       id="text202-7-9"
       style="font-size:192px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier">takedown_cpu()</text>
    <text
       xml:space="preserve"
       x="8335.4873"
       y="5094.127"
       font-style="normal"
       font-weight="bold"
       font-size="192"
       id="text202-7-9-6"
       style="font-size:192px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier">rcutree_migrate_callbacks()</text>
    <text
       xml:space="preserve"
       x="8335.4873"
       y="5357.1006"
       font-style="normal"
       font-weight="bold"
       font-size="192"
       id="text202-7-9-6-0"
       style="font-size:192px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier">rcu_migrate_callbacks()</text>
    <text
       xml:space="preserve"
       x="8768.4678"
       y="6224.9038"
       font-style="normal"
       font-weight="bold"
       font-size="192"
       id="text202-6-6-6"
       style="font-size:192px;font-style:normal;font-weight:bold;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier">rcu_advance_cbs()</text>
    <text
       xml:space="preserve"
       x="3467.9963"
       y="6987.9912"
       font-style="normal"
       font-weight="bold"
       font-size="192"
       id="text202-7-5-1-2-3"
       style="font-size:192px;font-style:normal;font-weight:bold;line-height:125%;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier"
       sodipodi:linespacing="125%"><tspan
         style="font-size:159.57754517px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Liberation Sans;-inkscape-font-specification:Liberation Sans"
         id="tspan3104-6">Leaf</tspan></text>
    <text
       xml:space="preserve"
       x="7220.106"
       y="6961.395"
       font-style="normal"
       font-weight="bold"
       font-size="192"
       id="text202-7-5-1-2-3-7"
       style="font-size:192px;font-style:normal;font-weight:bold;line-height:125%;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier"
       sodipodi:linespacing="125%"><tspan
         style="font-size:159.57754517px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Liberation Sans;-inkscape-font-specification:Liberation Sans"
         id="tspan3104-6-5">Leaf</tspan></text>
    <text
       xml:space="preserve"
       x="10905.331"
       y="6961.395"
       font-style="normal"
       font-weight="bold"
       font-size="192"
       id="text202-7-5-1-2-3-7-3"
       style="font-size:192px;font-style:normal;font-weight:bold;line-height:125%;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier"
       sodipodi:linespacing="125%"><tspan
         style="font-size:159.57754517px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Liberation Sans;-inkscape-font-specification:Liberation Sans"
         id="tspan3104-6-5-5">Leaf</tspan></text>
    <path
       sodipodi:type="arc"
       style="fill:#ffffa1;fill-opacity:0;stroke:#000000;stroke-width:2.25600004;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:2.256, 4.512;stroke-dashoffset:0"
       id="path3084-3"
       sodipodi:cx="319.379"
       sodipodi:cy="345.54001"
       sodipodi:rx="65.917107"
       sodipodi:ry="39.550262"
       d="m 385.2961,345.54001 c 0,21.84301 -29.51209,39.55026 -65.9171,39.55026 -36.40501,0 -65.91711,-17.70725 -65.91711,-39.55026 0,-21.84301 29.5121,-39.55026 65.91711,-39.55026 36.40501,0 65.9171,17.70725 65.9171,39.55026 z"
       transform="matrix(13.298129,0,0,13.298129,1872.6808,-2726.4833)" />
    <text
       xml:space="preserve"
       x="5717.4517"
       y="1785.2073"
       font-style="normal"
       font-weight="bold"
       font-size="192"
       id="text202-7-5-1-2-6"
       style="font-size:192px;font-style:normal;font-weight:bold;line-height:125%;text-anchor:start;fill:#000000;stroke-width:0.025in;font-family:Courier"
       sodipodi:linespacing="125%"><tspan
         style="font-size:159.57754517px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Liberation Sans;-inkscape-font-specification:Liberation Sans"
         id="tspan3104-7">Phase One</tspan></text>
    <text
       xml:space="preserve"
       style="font-size:159.57754517px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
       x="6119.668"
       y="2005.6624"
       id="text3110-5"
       sodipodi:linespacing="125%"><tspan
         sodipodi:role="line"
         id="tspan3112-3"
         x="6119.668"
         y="2005.6624">of Update</tspan></text>
  </g>
</svg>