[PATCH 10/17] ttm: add a memcg accounting flag to the alloc/populate APIs
David Airlie
airlied at redhat.com
Tue Jul 1 01:46:49 UTC 2025
On Mon, Jun 30, 2025 at 8:20 PM Christian König
<christian.koenig at amd.com> wrote:
>
> On 30.06.25 06:49, Dave Airlie wrote:
> > From: Dave Airlie <airlied at redhat.com>
> >
> > This flag does nothing yet, but this just changes the APIs to accept
> > it in the future across all users.
> >
> > This flag will eventually be filled out with when to account a tt
> > populate to a memcg.
>
> I would keep the pool completely out of memcg accounting and always account at a higher level.
>
> Accounting that low just gives a hughe surfurce for driver issues.
https://lore.kernel.org/dri-devel/20250512061913.3522902-6-airlied@gmail.com/
This is where I already tried it, and had to move it back:
"This version moves back from the resource to the tt layer,
when accounting at the resource layer, if an object is swapped
out there was no way to remove it from the accounting, whereas
the tt layer has more info for this."
Dave.
More information about the dri-devel
mailing list