CPU topology v2 phase 3: make CPU Sets mapping group-aware#9
Conversation
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 256088546f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| staticCpuSetMapping = CpuSetMapping.Empty; | ||
| } | ||
|
|
||
| staticInitialized = true; |
There was a problem hiding this comment.
Retry CPU-set mapping after initialization failures
Marking static initialization as complete even in the exception path makes a transient GetSystemCpuSetInformation failure permanent for the process lifetime. After one failed probe, staticCpuSetMapping is frozen as Empty, so later handlers never retry and both legacy mask application and processor-resolved ApplyCpuSelection will keep failing until restart. This regresses resiliency versus the prior behavior that retried on subsequent handler creation.
Useful? React with 👍 / 👎.
Summary
LogicalProcessorIndex -> CpuSetIdCPU Sets mapping withProcessorRef -> CpuSetId, preserving group and group-relative logical processor number.CpuSetId -> ProcessorRefmapping for verification/logging-ready lookup.ApplyCpuSelection(CpuSelection, bool)onIProcessCpuSetHandler/ProcessCpuSetHandlerwithout wiring it intoProcessServiceyet.ApplyCpuSetMask(long, bool)available and documents it as single-group <=64 logical processor compatibility path.Tests
CpuSelectionwith explicit CPU Set IDs applies those IDs.CpuSelectionwithout CPU Set IDs resolves viaProcessorRef -> CpuSetId.SetProcessDefaultCpuSets(handle, null, 0).ApplyCpuSetMask(long)remains characterized for single-group <=64 and does not represent Group 1 CPU0.Validation
dotnet test "ThreadPilot_1.sln" --configuration Release --no-restorepasses: 189 passed, 0 failed.Scope intentionally left unchanged
ProcessServiceruntime wiring toCpuSelection.