[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220417083204.2048364-1-guoren@kernel.org>
Date: Sun, 17 Apr 2022 16:32:01 +0800
From: guoren@...nel.org
To: guoren@...nel.org, arnd@...db.de, mark.rutland@....com,
boqun.feng@...il.com, peterz@...radead.org, will@...nel.org
Cc: linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-csky@...r.kernel.org, Guo Ren <guoren@...ux.alibaba.com>
Subject: [PATCH V3 0/3] csky: Optimize with acquire & release for atomic & cmpxchg
From: Guo Ren <guoren@...ux.alibaba.com>
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.
Important reference commit:
8e86f0b409a4 ("arm64: atomics: fix use of acquire + release for
full barrier semantics")
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: cmpxchg: Optimize with acquire & release
csky: atomic: Add custom atomic.h implementation
csky: atomic: Add conditional atomic operations' optimization
arch/csky/include/asm/atomic.h | 249 ++++++++++++++++++++++++++++++++
arch/csky/include/asm/barrier.h | 11 +-
arch/csky/include/asm/cmpxchg.h | 64 +++++++-
3 files changed, 316 insertions(+), 8 deletions(-)
create mode 100644 arch/csky/include/asm/atomic.h
--
2.25.1
Powered by blists - more mailing lists