| .. | .. |
|---|
| 1 | 1 | This document provides "recipes", that is, litmus tests for commonly |
|---|
| 2 | 2 | occurring situations, as well as a few that illustrate subtly broken but |
|---|
| 3 | 3 | attractive nuisances. Many of these recipes include example code from |
|---|
| 4 | | -v4.13 of the Linux kernel. |
|---|
| 4 | +v5.7 of the Linux kernel. |
|---|
| 5 | 5 | |
|---|
| 6 | 6 | The first section covers simple special cases, the second section |
|---|
| 7 | 7 | takes off the training wheels to cover more involved examples, |
|---|
| .. | .. |
|---|
| 126 | 126 | locking will be seen as ordered by CPUs not holding that lock. |
|---|
| 127 | 127 | Consider this example: |
|---|
| 128 | 128 | |
|---|
| 129 | | - /* See Z6.0+pooncerelease+poacquirerelease+fencembonceonce.litmus. */ |
|---|
| 129 | + /* See Z6.0+pooncelock+pooncelock+pombonce.litmus. */ |
|---|
| 130 | 130 | void CPU0(void) |
|---|
| 131 | 131 | { |
|---|
| 132 | 132 | spin_lock(&mylock); |
|---|
| .. | .. |
|---|
| 278 | 278 | first place (control dependency). Note that the term "data dependency" |
|---|
| 279 | 279 | is sometimes casually used to cover both address and data dependencies. |
|---|
| 280 | 280 | |
|---|
| 281 | | -In lib/prime_numbers.c, the expand_to_next_prime() function invokes |
|---|
| 281 | +In lib/math/prime_numbers.c, the expand_to_next_prime() function invokes |
|---|
| 282 | 282 | rcu_assign_pointer(), and the next_prime_number() function invokes |
|---|
| 283 | 283 | rcu_dereference(). This combination mediates access to a bit vector |
|---|
| 284 | 284 | that is expanded as additional primes are needed. |
|---|
| .. | .. |
|---|
| 311 | 311 | smp_rmb() macro orders prior loads against later loads. Therefore, if |
|---|
| 312 | 312 | the final value of r0 is 1, the final value of r1 must also be 1. |
|---|
| 313 | 313 | |
|---|
| 314 | | -The the xlog_state_switch_iclogs() function in fs/xfs/xfs_log.c contains |
|---|
| 314 | +The xlog_state_switch_iclogs() function in fs/xfs/xfs_log.c contains |
|---|
| 315 | 315 | the following write-side code fragment: |
|---|
| 316 | 316 | |
|---|
| 317 | 317 | log->l_curr_block -= log->l_logBBsize; |
|---|