perf: cache GPU sensor readings to reduce redundant driver polling#5495
Open
TUSHAR91316 wants to merge 1 commit into
Open
perf: cache GPU sensor readings to reduce redundant driver polling#5495TUSHAR91316 wants to merge 1 commit into
TUSHAR91316 wants to merge 1 commit into
Conversation
Introduce short-term caching for GPU telemetry to reduce frequent ADL/NV API calls. AmdGpuControl: add cached ADLPMLogData for discrete and integrated adapters with timestamps and helper methods (GetDiscreteLogData/GetIntegratedLogData); reuse cached data across temperature, GPU usage and power queries and enforce a 500ms reuse window. Also adjust IsValid placement and simplify iGPU power/usage paths. NvidiaGpuControl: add cached GPU state, usage and power values with 500ms expiry, update GetGpuState/GetGpuUse/GetGpuPower to use cached results and handle power states/NVML shutdown consistently. Minor whitespace/BOM cleanup in Nvidia file.
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.
Summary
Optimizes discrete and integrated GPU telemetry queries (temperature, usage, and wattage) in
AmdGpuControlandNvidiaGpuControlby caching sensor data for 500ms.Rationale
ADL2_New_QueryPMLogData_Get) so Edge Temp, activity, and power readings reuse a single cached payload per update cycle.