Make Summary 128-bit aligned within the cacheline#111
Merged
oathdruid merged 1 commit intobaidu:mainfrom Dec 22, 2025
Merged
Conversation
Collaborator
Collaborator
|
不过其实原理上只是形参问题的话,其实换uload按说更经济,底层存储的也是这个summary,都扩展到cachline其实稍微有点费空间 |
Contributor
Author
看https://rigtorp.se/isatomic/,似乎不能100%保证unaligned 128 bit的原子性。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ConcurrentSummer::Summary也有apache/brpc#3091 一样的问题,形参内存可能没有对齐,不能满足128bit原子读写要求。
babylon/src/babylon/concurrent/counter.h
Lines 324 to 341 in c230b4f