Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

place work-stealing queue indices on different cache lines to avoid false-sharing #52994

Merged
merged 1 commit into from
Jan 23, 2024
Merged
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
3 changes: 2 additions & 1 deletion src/work-stealing-queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ static inline ws_array_t *create_ws_array(size_t capacity, int32_t eltsz) JL_NOT

typedef struct {
_Atomic(int64_t) top;
_Atomic(int64_t) bottom;
char _padding[128 - sizeof(int64_t)];
vchuravy marked this conversation as resolved.
Show resolved Hide resolved
_Atomic(int64_t) bottom; // put on a separate cache line. conservatively estimate cache line size as 128 bytes
_Atomic(ws_array_t *) array;
} ws_queue_t;

Expand Down