Skip to content

Auto-port 5.0: Remove reference counting from size classed chunks#16378

Merged
chrisvest merged 1 commit into
5.0from
auto-port-pr-16306-to-5.0
Feb 27, 2026
Merged

Auto-port 5.0: Remove reference counting from size classed chunks#16378
chrisvest merged 1 commit into
5.0from
auto-port-pr-16306-to-5.0

Conversation

@netty-project-bot

Copy link
Copy Markdown
Contributor

Auto-port of #16306 to 5.0
Cherry-picked commit: de25e7a


Motivation:

SizeClassedChunk performs 2 atomic ops (retain/release) per allocation cycle on the hot path.

Modification:

Replace ref counting with a segment-count state machine that only needs atomics on the cold deallocation path.

Result:

No more per-allocation atomic operations for SizeClassedChunk.

Motivation:

SizeClassedChunk performs 2 atomic ops (retain/release) per allocation
cycle on the hot path.

Modification:

Replace ref counting with a segment-count state machine that only needs
atomics on the cold deallocation path.

Result:

No more per-allocation atomic operations for SizeClassedChunk.

(cherry picked from commit de25e7a)
@chrisvest chrisvest added this to the 5.0.0.Final milestone Feb 26, 2026
@chrisvest chrisvest enabled auto-merge (squash) February 26, 2026 18:09
@chrisvest chrisvest disabled auto-merge February 27, 2026 23:19
@chrisvest chrisvest merged commit 900aaca into 5.0 Feb 27, 2026
12 of 13 checks passed
@chrisvest chrisvest deleted the auto-port-pr-16306-to-5.0 branch February 27, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants