CPU topology v2 phase 5: add topology-aware preset generator foundation#11
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: 44bdc6f3bd
βΉοΈ 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".
| ? new[] | ||
| { | ||
| "p-cores-no-smt", | ||
| "l3-group-0-physical", |
There was a problem hiding this comment.
Select L3 gaming source from generated cache groups
The best-gaming source list is hard-coded to l3-group-0-physical, but L3 presets are created with IDs derived from the actual cache index (l3-group-{group.Key}-physical). Because CpuTopologySnapshot does not normalize cache indexes, a topology with cache IDs like 2/3 will generate valid L3 presets that are never considered for best-gaming, causing an unnecessary fallback to broader presets and losing the intended cache-group-aware recommendation.
Useful? React with πΒ / π.
| SmtSiblingCount = topology.GetSmtSiblingGlobalIndexes(processor).Count, | ||
| }; | ||
| }) | ||
| .GroupBy(item => item.CoreIndex) |
There was a problem hiding this comment.
Group physical-core selection by group-aware core key
SelectOneLogicalProcessorPerCore groups processors only by CoreIndex, which can collapse distinct cores when the same core index appears in different processor groups (a valid topology shape because CoreIndex uniqueness is not enforced by CpuTopologySnapshot). In that case, generated "physical" presets silently drop cores and can pin workloads to too few CPUs. The grouping key should include processor group context (for example (processor.Group, coreIndex)).
Useful? React with πΒ / π.
Summary
Adds the small foundation for topology-aware generated CPU presets without migrating UI, profiles, core masks, or runtime affinity apply paths.
CpuPreset,ICpuPresetGenerator,CpuPresetGenerator, andCpuPresetGenerationOptions.CpuTopologySnapshotmetadata only; no CPU SKU hardcoding.SourcePresetIdfor generated presets such asbest-gaming, while keepingReasonuser-facing.Out of scope
ProcessServicechanges.Tests
dotnet test "ThreadPilot_1.sln" --configuration Release --no-restoreExisting warnings remain in unrelated test files: CS1998 in
RetryPolicyServiceTestsand CS0067 inProcessMonitorManagerServiceTests.