| .. | .. |
|---|
| 684 | 684 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|---|
| 685 | 685 | This section presents a "toy" RCU implementation that is based on |
|---|
| 686 | 686 | "classic RCU". It is also short on performance (but only for updates) and |
|---|
| 687 | | -on features such as hotplug CPU and the ability to run in CONFIG_PREEMPTION |
|---|
| 687 | +on features such as hotplug CPU and the ability to run in CONFIG_PREEMPT |
|---|
| 688 | 688 | kernels. The definitions of rcu_dereference() and rcu_assign_pointer() |
|---|
| 689 | 689 | are the same as those shown in the preceding section, so they are omitted. |
|---|
| 690 | 690 | :: |
|---|
| .. | .. |
|---|
| 740 | 740 | Quick Quiz #3: |
|---|
| 741 | 741 | If it is illegal to block in an RCU read-side |
|---|
| 742 | 742 | critical section, what the heck do you do in |
|---|
| 743 | | - CONFIG_PREEMPT_RT, where normal spinlocks can block??? |
|---|
| 743 | + PREEMPT_RT, where normal spinlocks can block??? |
|---|
| 744 | 744 | |
|---|
| 745 | 745 | :ref:`Answers to Quick Quiz <8_whatisRCU>` |
|---|
| 746 | 746 | |
|---|
| .. | .. |
|---|
| 1094 | 1094 | overhead is **negative**. |
|---|
| 1095 | 1095 | |
|---|
| 1096 | 1096 | Answer: |
|---|
| 1097 | | - Imagine a single-CPU system with a non-CONFIG_PREEMPTION |
|---|
| 1097 | + Imagine a single-CPU system with a non-CONFIG_PREEMPT |
|---|
| 1098 | 1098 | kernel where a routing table is used by process-context |
|---|
| 1099 | 1099 | code, but can be updated by irq-context code (for example, |
|---|
| 1100 | 1100 | by an "ICMP REDIRECT" packet). The usual way of handling |
|---|
| .. | .. |
|---|
| 1121 | 1121 | Quick Quiz #3: |
|---|
| 1122 | 1122 | If it is illegal to block in an RCU read-side |
|---|
| 1123 | 1123 | critical section, what the heck do you do in |
|---|
| 1124 | | - CONFIG_PREEMPT_RT, where normal spinlocks can block??? |
|---|
| 1124 | + PREEMPT_RT, where normal spinlocks can block??? |
|---|
| 1125 | 1125 | |
|---|
| 1126 | 1126 | Answer: |
|---|
| 1127 | | - Just as CONFIG_PREEMPT_RT permits preemption of spinlock |
|---|
| 1127 | + Just as PREEMPT_RT permits preemption of spinlock |
|---|
| 1128 | 1128 | critical sections, it permits preemption of RCU |
|---|
| 1129 | 1129 | read-side critical sections. It also permits |
|---|
| 1130 | 1130 | spinlocks blocking while in RCU read-side critical |
|---|