[PATCH 17/17] amdgpu: add support for memory cgroups

David Airlie airlied at redhat.com
Thu Jul 3 21:22:20 UTC 2025


>
> Do you mean a task in cgroup A does amdgpu_gem_object_create() and then
> the actual allocation can happen in the task in cgroup B?

On android and in some graphics scenarios, this might happen, not sure
if it does always though. We have scenarios where a display server
allocate a buffer for an application to write into and then it
displays it, the ownership of that buffer can be a big rough.

But in most scenarios I think it'll be the same cgroup, and I think we
generally should account it to the original cgroup unless we
explicitly move the object to another one, (which we haven't got any
code for yet).

> >
> > BTW: It might be a good idea to not only limit the amount of memory you actually have allocated, but also how much you wanted to allocate.
>
> Do you mean accounting and limiting the reservations? Something like
> what hugetlb cgroup provides?
>

I'll let Christian answer that,
Dave.



More information about the dri-devel mailing list