Skip to content

csky: Optimize atomic_ops & cmpxchg

[email protected] linux-arch linux-csky lkml 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 0 repliesNew
  2. v33 patches 2 repliesSuperseded
  3. v22 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v11 patch1 replySuperseded

Changes in v4 from the cover letter

- Remove RELEASE_FENCE in ldex/stex loop by Buoqun's advice

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3csky: atomic: Optimize cmpxchg with acquire & releasearch/csky/include/asm/barrier.h arch/csky/include/asm/cmpxchg.h+67 -80 replies
2/3csky: atomic: Add custom atomic.h implementationarch/csky/include/asm/atomic.h+142 -00 replies
3/3csky: atomic: Add conditional atomic operations' optimizationarch/csky/include/asm/atomic.h+95 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH V4 0/3] csky: Optimize atomic_ops & cmpxchg

From: Guo Ren <[email protected]>

Optimize arch_xchg|cmpxchg|cmpxchg_local with ASM acquire|release instructions instead of previous C based.

The generic atomic.h used cmpxchg to implement the atomic operations, it will cause daul loop to reduce the forward guarantee. The patch implement csky custom atomic operations with ldex/stex instructions for the best performance.

Changes in V4:
- Remove RELEASE_FENCE in ldex/stex loop by Buoqun's advice

Changes in V3:
- Add arch_atomic_(fetch_add_unless, inc_unless_negative, dec_unless_positive, dec_if_positive)

Changes in V2:
- Fixup use of acquire + release for barrier semantics by Rutland.

Guo Ren (3):
csky: atomic: Optimize cmpxchg with acquire & release
csky: atomic: Add custom atomic.h implementation
csky: atomic: Add conditional atomic operations' optimization

 arch/csky/include/asm/atomic.h  | 237 ++++++++++++++++++++++++++++++++
 arch/csky/include/asm/barrier.h |  11 +-
 arch/csky/include/asm/cmpxchg.h |  64 ++++++++-
 3 files changed, 304 insertions(+), 8 deletions(-)
 create mode 100644 arch/csky/include/asm/atomic.h
Signature · 1 line
2.25.1