Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/util.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ while (list) {

## ShardedStack (`sharded-stack.h`)

Per-CPU intrusive LIFO stack backed by restartable sequences (rseq). The fast path (push/pop when the per-CPU list is non-empty/non-full) executes zero atomic instructions. The kernel aborts and restarts the rseq critical section on preemption or migration, so plain loads/stores suffice for per-CPU state. The slow path transfers a full batch to/from a global pool via a single 128-bit CAS, amortising its cost over `batchSize` operations.
Per-CPU intrusive LIFO stack backed by restartable sequences (rseq). The fast path (push/pop when the per-CPU list is non-empty/non-full) executes zero atomic instructions. The kernel aborts and restarts the rseq critical section on preemption or migration, so plain loads/stores suffice for per-CPU state. The slow path transfers a full batch to/from a global pool via a single 128-bit CAS, amortizing its cost over `batchSize` operations.

Objects must embed a `StackEntry` member; the typed wrapper `ShardedStack` takes a member pointer as a template argument.

Expand Down
2 changes: 1 addition & 1 deletion include/silk/util/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static inline void schedYield() noexcept
}

/**
* Emit a CPU pause hint to reduce power and improve pipeline behaviour in spin loops.
* Emit a CPU pause hint to reduce power and improve pipeline behavior in spin loops.
*
* On aarch64 we use ISB rather than YIELD. YIELD is a NOP on non-SMT cores
* (which includes all Graviton generations), so it provides no backoff at all.
Expand Down
2 changes: 1 addition & 1 deletion include/silk/util/sharded-stack.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace silk
*
* Each CPU holds a single linked list. When the list empties on pop, or fills on
* push, a single 128-bit CAS transfers a batch to/from the global
* fullFreeLists/emptyFreeLists pool, amortising its cost over batchSize operations.
* fullFreeLists/emptyFreeLists pool, amortizing its cost over batchSize operations.
*
* Objects are intrusive: each element must embed a StackEntry. Use the typed
* wrapper ShardedStack instead of this class directly.
Expand Down