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

chore: more efficient access to FiberInterface epoch field #388

Merged
merged 1 commit into from
Mar 4, 2025
Merged

Conversation

romange
Copy link
Owner

@romange romange commented Mar 2, 2025

To improve efficiency of fiber context switch operations.

@romange romange changed the title chore: provide more efficient access to FiberInterface active and epo… chore: more efficient access to FiberInterface active and epoch fields Mar 2, 2025
@romange romange force-pushed the Pr2 branch 2 times, most recently from 083d602 to b803d2f Compare March 3, 2025 07:33
Done to improve efficiency of fiber context switch operations.

Signed-off-by: Roman Gershman <[email protected]>
@romange romange changed the title chore: more efficient access to FiberInterface active and epoch fields chore: more efficient access to FiberInterface epoch field Mar 3, 2025
@romange romange requested review from chakaz and adiholden March 3, 2025 08:33
Comment on lines +268 to +270
static __thread struct TL {
uint64_t epoch = 0;
} tl;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you use a struct here instead of just static __thread uint64_t epoch_ = 0;?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no strong reason, just a placeholder to move more "safe" fields.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, gotcha, this is intended to (potentially) grow..

@romange
Copy link
Owner Author

romange commented Mar 4, 2025

Thanks! :)

@romange romange merged commit 802f520 into master Mar 4, 2025
8 checks passed
@romange romange deleted the Pr2 branch March 4, 2025 09:36
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.

2 participants