lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ba987da3-b4aa-410c-95ae-434e94793d85@arm.com>
Date: Wed, 14 Feb 2024 13:52:05 +0000
From: Steven Price <steven.price@....com>
To: Adrián Larumbe <adrian.larumbe@...labora.com>,
 Boris Brezillon <boris.brezillon@...labora.com>,
 Rob Herring <robh@...nel.org>,
 Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
 Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
 David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>
Cc: linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH 0/1] Always record job cycle and timestamp information

Hi Adrián,

On 14/02/2024 12:14, Adrián Larumbe wrote:
> A driver user expressed interest in being able to access engine usage stats
> through fdinfo when debugfs is not built into their kernel. In the current
> implementation, this wasn't possible, because it was assumed even for
> inflight jobs enabling the cycle counter and timestamp registers would
> incur in additional power consumption, so both were kept disabled until
> toggled through debugfs.
> 
> A second read of the TRM made me think otherwise, but this is something
> that would be best clarified by someone from ARM's side.

I'm afraid I can't give a definitive answer. This will probably vary
depending on implementation. The command register enables/disables
"propagation" of the cycle/timestamp values. This propagation will cost
some power (gates are getting toggled) but whether that power is
completely in the noise of the GPU as a whole I can't say.

The out-of-tree kbase driver only enables the counters for jobs
explicitly marked (BASE_JD_REQ_PERMON) or due to an explicit connection
from a profiler.

I'd be happier moving the debugfs file to sysfs rather than assuming
that the power consumption is small enough for all platforms.

Ideally we'd have some sort of kernel interface for a profiler to inform
the kernel what it is interested in, but I can't immediately see how to
make that useful across different drivers. kbase's profiling support is
great with our profiling tools, but there's a very strong connection
between the two.

Steve

> Adrián Larumbe (1):
>   drm/panfrost: Always record job cycle and timestamp information
> 
>  drivers/gpu/drm/panfrost/Makefile           |  2 --
>  drivers/gpu/drm/panfrost/panfrost_debugfs.c | 21 ------------------
>  drivers/gpu/drm/panfrost/panfrost_debugfs.h | 14 ------------
>  drivers/gpu/drm/panfrost/panfrost_device.h  |  1 -
>  drivers/gpu/drm/panfrost/panfrost_drv.c     |  5 -----
>  drivers/gpu/drm/panfrost/panfrost_job.c     | 24 ++++++++-------------
>  drivers/gpu/drm/panfrost/panfrost_job.h     |  1 -
>  7 files changed, 9 insertions(+), 59 deletions(-)
>  delete mode 100644 drivers/gpu/drm/panfrost/panfrost_debugfs.c
>  delete mode 100644 drivers/gpu/drm/panfrost/panfrost_debugfs.h
> 
> 
> base-commit: 6b1f93ea345947c94bf3a7a6e668a2acfd310918


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ