From: "Christian König" <christian.koenig@amd.com>
To: Mukul Joshi <mukul.joshi@amd.com>, amd-gfx@lists.freedesktop.org
Cc: Felix.Kuehling@amd.com, rajneesh.bhardwaj@amd.com,
Philip Yang <philip.yang@amd.com>
Subject: Re: [PATCH] drm/ttm: Add cgroup memory accounting for GTT memory
Date: Fri, 7 Jun 2024 09:26:10 +0200 [thread overview]
Message-ID: <c2ce5317-a817-48d8-9fa7-ae6dcfbdaf3b@amd.com> (raw)
In-Reply-To: <20240606192233.2836986-1-mukul.joshi@amd.com>
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.
Regards,
Christian.
>
> Suggested-by: Philip Yang <philip.yang@amd.com>
> Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
> ---
> 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);
next prev parent reply other threads:[~2024-06-07 7:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-06 19:22 [PATCH] drm/ttm: Add cgroup memory accounting for GTT memory Mukul Joshi
2024-06-07 7:26 ` Christian König [this message]
2024-06-07 14:43 ` Joshi, Mukul
2024-06-07 14:51 ` Christian König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c2ce5317-a817-48d8-9fa7-ae6dcfbdaf3b@amd.com \
--to=christian.koenig@amd.com \
--cc=Felix.Kuehling@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=mukul.joshi@amd.com \
--cc=philip.yang@amd.com \
--cc=rajneesh.bhardwaj@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox