microsoft / microsoft/snmalloc

Aarch64 LSE 16-byte CAS operation

Open
#796 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
2k
Forks
138
Avg merge
11h 19m
Merged PRs (30d)
5

Description

https://github.com/microsoft/snmalloc/blob/3385660fd7c674c11c74b501fd57646dc50618e2/src/snmalloc/ds/aba.h#L24C13-L24C28

Since we are not using LL/SC abstraction anyway, perhaps we can relax the first condition to defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16) || defined(PLATFORM_IS_X86)

This allows compiler to emit 16b CAS based code on aarch64 platform with LSE.

https://developer.arm.com/documentation/100069/0606/Data-Transfer-Instructions/CASPA--CASPAL--CASP--CASPL--CASPAL--CASP--CASPL?lang=en

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/snmalloc/ds/aba.h around line 24 and review the existing 16-byte CAS platform condition alongside the linked ARM CASP documentation. Verify the proposed condition on an Aarch64 toolchain with LSE support and confirm that the allocator builds and its relevant tests pass with the emitted 16-byte CAS code.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.