@@ -296,7 +296,8 @@ Quick Quiz #1:
296
296
Is there any other situation where rcu_barrier() might
297
297
be required?
298
298
299
- Answer: Interestingly enough, rcu_barrier() was not originally
299
+ Answer:
300
+ Interestingly enough, rcu_barrier() was not originally
300
301
implemented for module unloading. Nikita Danilov was using
301
302
RCU in a filesystem, which resulted in a similar situation at
302
303
filesystem-unmount time. Dipankar Sarma coded up rcu_barrier()
@@ -315,7 +316,8 @@ Quick Quiz #2:
315
316
Why doesn't line 8 initialize rcu_barrier_cpu_count to zero,
316
317
thereby avoiding the need for lines 9 and 10?
317
318
318
- Answer: Suppose that the on_each_cpu() function shown on line 8 was
319
+ Answer:
320
+ Suppose that the on_each_cpu() function shown on line 8 was
319
321
delayed, so that CPU 0's rcu_barrier_func() executed and
320
322
the corresponding grace period elapsed, all before CPU 1's
321
323
rcu_barrier_func() started executing. This would result in
@@ -351,7 +353,8 @@ Quick Quiz #3:
351
353
are delayed for a full grace period? Couldn't this result in
352
354
rcu_barrier() returning prematurely?
353
355
354
- Answer: This cannot happen. The reason is that on_each_cpu() has its last
356
+ Answer:
357
+ This cannot happen. The reason is that on_each_cpu() has its last
355
358
argument, the wait flag, set to "1". This flag is passed through
356
359
to smp_call_function() and further to smp_call_function_on_cpu(),
357
360
causing this latter to spin until the cross-CPU invocation of
0 commit comments