Open
Conversation
added 2 commits
March 2, 2026 20:53
This reverts commit c42157c.
|
🤖 SemverChecks 🤖 Click for details |
wdcui
approved these changes
Mar 2, 2026
| // SAFETY: We dont support concurrent AP/VTL initialization and thus share | ||
| // the same stack pointer. If we plan to support concurrent initialization, | ||
| // we should provide seperate stack pointers for each AP (which might not | ||
| // scale if there are several 100s of APs). |
Member
There was a problem hiding this comment.
For performance reasons, would we need to initialize APs concurrently if there are too many of them?
Contributor
Author
There was a problem hiding this comment.
We would have two options:
- Spin-lock the shared boot stack page until a heap-allocated stack is ready (re-introduce c42157c).
- Pre-allocate temporal stack pages for all possible vCPUs and reclaim them later.
I implemented 1 (c42157c) but not 2 because I hesitated to pre-allocate 100s of pages (e.g., Azure HBv5 instances support up to 368 vCPUs) and then reverted it just because VTL0 currently does not do concurrent AP/VTL1 initialization (effectively no-op). We can re-introduce it for future proofing.
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.
This PR refactors the LVBS platform's
PerCpuVariables, improving its security, safety, and performance.Changes:
PER_CPU_VARIABLE_ADDRESSESarray.RefCellis no longer needed.PerCpuVariableson demand when each AP firstly enters VTL1.PerCpuVariablesstruct forasmaccess and strict interior mutability (CellandUnsafeCell).