Skip to content

Conversation

@Explorer09
Copy link
Contributor

GPUMeter_updateValues() used a locally cached "residue time" variable for computing the percentage of the "GPU residue" usage. The "residue" percentages of subsequent GPUMeter instances could be 0 due to the cached "residue time" off-sync with the time data from the LinuxMachine instance.

Rewrite the logic of the function so that all computed GPU percentage values are cached, and the cache updated only when there's increment on host->monotonicMs.

@BenBE BenBE added enhancement Extension or improvement to existing feature Linux 🐧 Linux related issues labels Feb 22, 2025
@Explorer09 Explorer09 force-pushed the gpu-meter-residue-percentage branch 2 times, most recently from 88ae698 to a341f4e Compare February 23, 2025 18:30
@BenBE BenBE added this to the 3.4.1 milestone Feb 24, 2025
@Explorer09 Explorer09 force-pushed the gpu-meter-residue-percentage branch 2 times, most recently from e519528 to dc932f8 Compare March 8, 2025 08:38
@Explorer09 Explorer09 force-pushed the gpu-meter-residue-percentage branch from dc932f8 to 533a30f Compare March 11, 2025 18:55
@BenBE BenBE modified the milestones: 3.4.1, 3.5.0 Mar 12, 2025
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
GPUMeter_updateValues() used a locally cached "residue time" variable
for computing the percentage of the "GPU residue" usage. The "residue"
percentages of subsequent GPUMeter instances could be 0 due to the
cached "residue time" off-sync with the time data from the LinuxMachine
instance.

Rewrite the logic of the function so that all computed GPU percentage
values are cached, and the cache updated only when there's increment on
host->monotonicMs.

Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
@Explorer09 Explorer09 force-pushed the gpu-meter-residue-percentage branch from 533a30f to 52f2d3b Compare April 17, 2025 19:26
@BenBE BenBE merged commit 52f2d3b into htop-dev:main May 9, 2025
19 checks passed
@Explorer09 Explorer09 deleted the gpu-meter-residue-percentage branch May 9, 2025 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Extension or improvement to existing feature Linux 🐧 Linux related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants