Skip to content

Align atomic storage

Finn Thain bpf linux-arch linux-csky linux-m68k linux-sh lkml openrisc 6 versions – Applied

Status from this message: [merged mm-nonmm-stable] atomic-add-option-for-weaker-alignment-check.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest4 patches 4 repliesApplied 4/4
  2. v64 patches 2 repliesSuperseded
  3. v54 patches 4 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v4 RFC5 patches3 repliesSuperseded
v3 RFC5 patches12 repliesSuperseded
v2 RFC3 patches40 repliesSuperseded

Changes in v7 from the cover letter

- Test for __DISABLE_EXPORTS macro instead of __DISABLE_BUG_TABLE macro.

Patches in v7 All 4 applied

#Subject and filesSizeRepliesApplied
1/4bpf: Explicitly align bpf_res_spin_lockinclude/asm-generic/rqspinlock.h kernel/bpf/rqspinlock.c+1 -20 repliesApplied
2/4atomic: Specify alignment for atomic_t and atomic64_tinclude/asm-generic/atomic64.h include/linux/types.h+2 -20 repliesApplied
3/4atomic: Add alignment check to instrumented atomic operationsinclude/linux/instrumented.h lib/Kconfig.debug+21 -04 repliesApplied
4/4atomic: Add option for weaker alignment checkinclude/linux/instrumented.h lib/Kconfig.debug+15 -10 repliesApplied

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchAlexei StarovoitovArnd BergmannGuo RenGeert Uytterhoeven
1/4A-b R-b
2/4R-b A-b
3/4Suggested-by-suggested-by
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v7 thread

Cover letter [PATCH v7 0/4] Align atomic storage

This series adds the __aligned attribute to atomic_t and atomic64_t definitions in include/linux and include/asm-generic (respectively) to get natural alignment of both types on csky, m68k, microblaze, nios2, openrisc and sh.

This series also adds Kconfig options to enable a new run-time warning to help reveal misaligned atomic accesses on platforms which don't trap that.

The performance impact is expected to vary across platforms and workloads. The measurements I made on m68k show that some workloads run faster and others slower.

---

Changed since v6
- Test for __DISABLE_EXPORTS macro instead of __DISABLE_BUG_TABLE macro.

Changed since v5:
- Added acked-by and revewed-by tags.
- Added a new macro to inhibit emission of __bug_table section, for the benefit of pre-boot code like the EFI stub loader.

Changed since v4:
- Dropped parisc header file patch as it's been merged already.
- Submitted as PATCH instead of RFC.

Changed since v3:
- Rebased on v6.17.
- New patch to resolve header dependency issue on parisc.
- Dropped documentation patch.

Changed since v2:
- Specify natural alignment for atomic64_t.
- CONFIG_DEBUG_ATOMIC checks for natural alignment again.
- New patch to add weakened alignment check.
- New patch for explicit alignment in BPF header.

---

Finn Thain (3):
bpf: Explicitly align bpf_res_spin_lock
atomic: Specify alignment for atomic_t and atomic64_t
atomic: Add option for weaker alignment check

Peter Zijlstra (1):
atomic: Add alignment check to instrumented atomic operations

 include/asm-generic/atomic64.h   |  2 +-
 include/asm-generic/rqspinlock.h |  2 +-
 include/linux/instrumented.h     | 17 +++++++++++++++++
 include/linux/types.h            |  2 +-
 kernel/bpf/rqspinlock.c          |  1 -
 lib/Kconfig.debug                | 18 ++++++++++++++++++
 6 files changed, 38 insertions(+), 4 deletions(-)
Signature · 1 line
2.49.1