Skip to content

Toyrcu: replace racy plain accesses with READ_ONCE()

Junchang Wang perfbook 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 0 repliesNew
  2. v32 patches 5 repliesSuperseded
  3. v23 patches 5 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches2 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2rcu: Use READ_ONCE() and WRITE_ONCE() for shared variable rcu_gp_ctrCodeSamples/defer/rcu.c CodeSamples/defer/rcu.h appendix/toyrcu/toyrcu.tex+74 -780 replies
2/2rcu_qs: Use READ_ONCE() AND WRITE_ONCE() for shared variable rcu_gp_ctrCodeSamples/defer/rcu_qs.c CodeSamples/defer/rcu_qs.h appendix/toyrcu/toyrcu.tex+78 -1040 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchAkira Yokosawa
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/2] Toyrcu: replace racy plain accesses with READ_ONCE()

Hi list,

Variable rcu_gp_ctr is accessed concurrently by the updater and readers, and hence should be protected by READ_ONCE() and WRITE_ONCE(). This patch set updates rcu and rcu_qs.

The tex file is updated accordingly. And a new scheme, which is suggested by Akira and can extract code snippets from the source code, has been applied.

Please note that rcu_nest also needs to be updated. I will first make sure that I'm fully understand how it works, and then submit a patch for it.

Junchang Wang (2):
rcu: Use READ_ONCE() and WRITE_ONCE() for shared variable rcu_gp_ctr
rcu_qs: Use READ_ONCE() AND WRITE_ONCE() for shared variable
rcu_gp_ctr

 CodeSamples/defer/rcu.c    |  34 +++++---
 CodeSamples/defer/rcu.h    |  21 +++--
 CodeSamples/defer/rcu_qs.c |  31 ++++---
 CodeSamples/defer/rcu_qs.h |  42 ++++-----
 appendix/toyrcu/toyrcu.tex | 206 +++++++++++++++++----------------------------
 5 files changed, 152 insertions(+), 182 deletions(-)
Signature · 1 line
2.7.4