Add Process Affinity Presets (resolves #2644) - #3009
Open
NotEnsoul wants to merge 1 commit into
Open
Conversation
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.
Description
Summary
This PR resolves issue #2644 by adding CPU Affinity Presets to process context menus (process tree view & process properties options menu) and directly within the Affinity dialog window.
Features
Hybrid Architecture Auto-Detection (P-Cores vs. E-Cores)
Performance cores (P-Cores)andEfficiency cores (E-Cores)presets.CCD / L3 Cache Cluster Auto-Detection (AMD Ryzen / EPYC / Threadripper)
CCD 0,CCD 1, etc.).NUMA Node Auto-Detection
NUMA Node 0,NUMA Node 1, etc.).Standard Core Presets
All cores,Even cores,Odd cores,First half of cores, andSecond half of cores.Custom User Presets (Save & Clear)
Preset 1throughPreset 4), persisted across app restarts.Clear preset...menu to clear individual or all custom presets.UI Integration
Affinityitem in process context menus into a rich submenu withCustom...and all presets.Presets...button to the Affinity dialog box for easy preset selection inside the dialog.Key File Changes
SystemInformer/resource.h&SystemInformer.rc: Added preset resource IDs andPresets...button to the Affinity dialog.SystemInformer/include/phsettings.h&settings.c: Registered custom preset mask and name settings.SystemInformer/include/phapp.h: Declared preset helper functions.SystemInformer/affinity.c: Implemented CPU topology detection, preset mask resolution, dynamic menu generation, and preset saving/clearing.SystemInformer/mwpgproc.c,procprp.c,mainwnd.c: Integrated Affinity submenu into process tree view and properties options menu.