Re: [igt-dev] [PATCH i-g-t] i915/i915_power: Measure GPU idle/busy power

Dixit, Ashutosh
2023-01-19T03:32:22Z

On Tue, 17 Jan 2023 23:22:46 -0800, Tauro, Riana wrote:
>
> Hi Ashutosh
>

Hi Riana,

> Energy measurement when idle and with workload is also a part of rc6-idle
> test. Why do we need new tests?

We want to be able to measure max/peak power.

rc6-idle has this:

static void bg_load()
{
...
/* aim for ~1% busy */

Therefore it measures this:

[adixit@DUT1220-DG2SVC igt-gpu-tools]$ sudo ./build/tests/i915_pm_rc6_residency --r rc6-idle
IGT-Version: 1.27-g369bb6fb0f (x86_64) (Linux: 5.15.47+ x86_64)
Opened device: /dev/dri/card0
Starting subtest: rc6-idle
Starting dynamic subtest: gt0-rcs0
Total energy used while idle: 85825.3mJ (28606.5mW)
Total energy used for normal: 86731.6mJ (28908.6mW)
Total energy used for boost: 86992.8mJ (28995.8mW)
Total energy used for once: 86677.9mJ (28890.5mW)
Dynamic subtest gt0-rcs0: SUCCESS (12.235s)

The new test measures this:

[adixit@DUT1220-DG2SVC igt-gpu-tools]$ sudo ./build/tests/i915_power
IGT-Version: 1.27-g369bb6fb0f (x86_64) (Linux: 5.15.47+ x86_64)
Opened device: /dev/dri/card0
Starting subtest: gpu-idle
Measured power: 28535.5 mW
Subtest gpu-idle: SUCCESS (3.002s)
Starting subtest: gpu-busy
Measured power: 50331.9 mW
Subtest gpu-busy: SUCCESS (3.008s)

So you can see rc6-idle basically measures idle power (28 W instead of 50
W), not power under load.

Other tests such as gem_exec_schedule also have igt_require etc. which skip
in all sorts of situations. That is why I was forced to write these simple
new tests.

Thanks.
--
Ashutosh