[lkml]   [2020]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2] Add gpu memory tracepoints
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!

On Wed, Feb 12, 2020 at 4:40 PM Greg KH <> wrote:
> On Wed, Feb 12, 2020 at 04:32:59PM -0800, wrote:
> > From: Yiwei Zhang <>
> >
> > 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 <>
> If this helps gpu drivers wean themselves off of debugfs, I am all for
> it:
> Acked-by: Greg Kroah-Hartman <>
> Thanks for doing this.
> greg k-h

 \ /
  Last update: 2020-02-13 02:24    [W:0.085 / U:0.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site