Re: [PATCH v2] Add gpu memory tracepoints
From: Yiwei Zhang
Date: Wed Feb 12 2020 - 20:23:42 EST
Hi Greg,
Thanks for your prompt response!
For upstream drm gem based gfx drivers, the lower level device driver
layer is able to implement such per-process gpu memory total counters
but the common drm gem layer is probably not. At least the global
total gpu memory counter is fairly easy to implement, and then this
tracepoint can still be useful right away.
For Android, the debugfs has already been forced to be deprecated in
the coming Android 11 release. We have asked Android GPU vendors to
implement such global and per-process total memory counters. So they
can easily use this tracepoint inside the driver. This is mainly to
serve the profiling needs as well as the runtime query needs(by
attaching a eBPF program from userspace), and this patch helps
standardize the tracepoint in the kernel.
Many thanks!
Yiwei
On Wed, Feb 12, 2020 at 4:40 PM Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Wed, Feb 12, 2020 at 04:32:59PM -0800, zzyiwei@xxxxxxxxxx wrote:
> > From: Yiwei Zhang <zzyiwei@xxxxxxxxxx>
> >
> > This change adds the below gpu memory tracepoint:
> > gpu_mem/gpu_mem_total: track global or process gpu memory total counters
> >
> > Signed-off-by: Yiwei Zhang <zzyiwei@xxxxxxxxxx>
>
> If this helps gpu drivers wean themselves off of debugfs, I am all for
> it:
> Acked-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
>
> Thanks for doing this.
>
> greg k-h