Patches to chapter Deferred Processing
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | routetorture.h: Fix typos in help messagesCodeSamples/ | +2 | 0 replies | |
| 2/2 | routetorture.h: Switch from ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE()CodeSamples/ | +8 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] Patches to chapter Deferred Processing
Hi Paul and list,
Attached are two patches for routetorture.h. Please take a look.
One of my remaining question is about the two smp_mb() in routetorture.h. Take the smp_mb() in perftest() as example, my understanding is that it is used to prevent the access to nthreads_running and access to goflag from being reorganized. If that's the case, don't we need a paired memory barrier instruction in perftest_reader()? Specifically, in between line 105 (atomic_inc(&nthreads_running);) and line 106 (gf = READ_ONCE(goflag);).
Another puzzle is that we are using shared memory 'pap' to transfer statistic results from working threads, e.g. perftest_reader, to main thread, e.g. perftest. Do we need a smp_mb() at the tail (before instruction return) of function perftest_reader to force the results being written before the thread terminates? In other words, I'm not sure if the two events, writing to shared memory pap and thread termination, could be reordered. Hints are welcome!
Thanks,
--Jason
Junchang Wang (2):
Fix typos in help messages
routetorture.h: Switch from ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE()
CodeSamples/defer/routetorture.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
Signature · 1 line
2.7.4