[AMD Official Use Only - AMD Internal Distribution Only]

> -----Original Message-----
> From: Koenig, Christian <[email protected]>
> Sent: Friday, June 7, 2024 3:26 AM
> To: Joshi, Mukul <[email protected]>; [email protected]
> Cc: Kuehling, Felix <[email protected]>; Bhardwaj, Rajneesh
> <[email protected]>; Yang, Philip <[email protected]>
> Subject: Re: [PATCH] drm/ttm: Add cgroup memory accounting for GTT
> memory
>
> Am 06.06.24 um 21:22 schrieb Mukul Joshi:
> > Make sure we do not overflow the memory limits set for a cgroup when
> > doing GTT memory allocations.
>
> NAK, That's intentionally not done like that.
>
> Please see the cgroup discussion on memory management on the public
> mailing list.
>
Can you please point us to that discussion?

Thanks,
Mukul

> Regards,
> Christian.
>
> >
> > Suggested-by: Philip Yang <[email protected]>
> > Signed-off-by: Mukul Joshi <[email protected]>
> > ---
> >   drivers/gpu/drm/ttm/ttm_pool.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/ttm/ttm_pool.c
> > b/drivers/gpu/drm/ttm/ttm_pool.c index 6e1fd6985ffc..59e1accdef08
> > 100644
> > --- a/drivers/gpu/drm/ttm/ttm_pool.c
> > +++ b/drivers/gpu/drm/ttm/ttm_pool.c
> > @@ -91,7 +91,7 @@ static struct page *ttm_pool_alloc_page(struct
> ttm_pool *pool, gfp_t gfp_flags,
> >      */
> >     if (order)
> >             gfp_flags |= __GFP_NOMEMALLOC | __GFP_NORETRY |
> __GFP_NOWARN |
> > -                   __GFP_KSWAPD_RECLAIM;
> > +                   __GFP_KSWAPD_RECLAIM | __GFP_ACCOUNT;
> >
> >     if (!pool->use_dma_alloc) {
> >             p = alloc_pages_node(pool->nid, gfp_flags, order);

Reply via email to