Re: [PATCH v11 2/3] x86,/proc/pid/status: Add AVX-512 usage elapsed time

From: Arjan van de Ven
Date: Wed Feb 20 2019 - 10:39:00 EST


On 2/20/2019 7:35 AM, David Laight wrote:
From: Sent: 16 February 2019 12:56
To: Li, Aubrey
...
The above experiment just confirms what I said: The numbers are inaccurate
and potentially misleading to a large extent when the AVX using task is not
scheduled out for a longer time.

Not only that, they won't detect programs that use AVX-512 but never
context switch with live AVX-512 registers.


you are completely correct in stating that this approach is basically sampling
at a relatively course level and such sampling will give false negatives

the alternative is not sampling, and not knowing anything at all,
unless you have a better suggestion on how to help find tasks that use avx512
in a low overhead way

(the typical use case is trying to find workloads that use avx512 to help
scheduling those workloads in the future in the cloud orchestrator, for example
to help them favor machines that support avx512 over machines that don't)