Proposal to report GPU private memory allocations with sysfs nodes [plain text version]

Rohan Garg rohan.garg at collabora.com
Fri Mar 20 12:07:26 UTC 2020


Hi Yiwei
After some deliberation on how to move forward with my BO Labeling patches[1],
we've come up with the following structure for debugfs entries:

/debugfs/dri/128/bo/<handle>/label
/debugfs/dri/128/bo/<handle>/size

My initial idea was to count the total memory allocated for a particular label 
in kernel space, but that turned out to be far too complicated to implement. 
Which is why we decided to move towards something simpler and handle collating 
this information on the userspace side of things.

Would this satisfy most of the Android  teams requirements? I understand that 
it would leave out the memory tracking requirements tied to a specific PID, 
but correct me if I'm wrong, would this not possible with gralloc on Android?

Cheers
Rohan Garg

[1] https://patchwork.freedesktop.org/patch/335508/?series=66752&rev=4

On lunes, 6 de enero de 2020 21:47:21 (CET) Yiwei Zhang wrote:
> Thanks, I'll check it out.
> 
> Best,
> Yiwei
> 
> On Mon, Jan 6, 2020 at 2:46 AM Rohan Garg <rohan.garg at collabora.com> wrote:
> > Hi Yiwei
> > 
> > On jueves, 19 de diciembre de 2019 19:52:26 (CET) Yiwei Zhang wrote:
> > > Hi Rohan,
> > > 
> > > Thanks for pointing out the pids issue! Then the index would be
> > 
> > {namespace
> > 
> > > + pid(in that namespace)}. I'll grab a setup and play with the driver to
> > > see what I can do. I know how to find an Intel or Freedreno setup, but
> > 
> > I'd
> > 
> > > still like to know is there a development friendly Mali setup?
> > 
> > You should be able to setup a Mali T860 compatible device with this guide
> > [1].
> > 
> > Cheers
> > Rohan Garg
> > 
> > [1] https://panfrost.freedesktop.org/building-panfrost-mesa.html

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20200320/1793c505/attachment.sig>


More information about the dri-devel mailing list