From: "Christian König" <christian.koenig@amd.com>
To: "Bhardwaj, Rajneesh" <Rajneesh.Bhardwaj@amd.com>,
Alex Deucher <alexdeucher@gmail.com>,
Maling list - DRI developers <dri-devel@lists.freedesktop.org>
Cc: "amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
"Kuehling, Felix" <Felix.Kuehling@amd.com>,
"Deucher, Alexander" <Alexander.Deucher@amd.com>
Subject: Re: [PATCH 2/2] drm/ttm: Make ttm shrinkers NUMA aware
Date: Wed, 3 Jul 2024 08:53:41 +0200 [thread overview]
Message-ID: <920e08ca-1318-4c0f-b1dc-b335c00302b1@amd.com> (raw)
In-Reply-To: <DS7PR12MB59332621FF50996A88C3F84EFEDC2@DS7PR12MB5933.namprd12.prod.outlook.com>
Am 02.07.24 um 23:54 schrieb Bhardwaj, Rajneesh:
> [AMD Official Use Only - AMD Internal Distribution Only]
>
> -----Original Message-----
> From: Koenig, Christian <Christian.Koenig@amd.com>
> Sent: Tuesday, July 2, 2024 2:25 PM
> To: Alex Deucher <alexdeucher@gmail.com>; Bhardwaj, Rajneesh <Rajneesh.Bhardwaj@amd.com>; Maling list - DRI developers <dri-devel@lists.freedesktop.org>
> Cc: amd-gfx@lists.freedesktop.org; Kuehling, Felix <Felix.Kuehling@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>
> Subject: Re: [PATCH 2/2] drm/ttm: Make ttm shrinkers NUMA aware
>
>
>
> Am 02.07.24 um 20:20 schrieb Alex Deucher:
>> + dri-devel
>>
>> On Tue, Jul 2, 2024 at 1:40 PM Rajneesh Bhardwaj
>> <rajneesh.bhardwaj@amd.com> wrote:
>>> Otherwise the nid is always passed as 0 during memory reclaim so make
>>> TTM shrinkers NUMA aware.
>>>
>>> Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@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 cc27d5c7afe8..f93ac9089a60
>>> 100644
>>> --- a/drivers/gpu/drm/ttm/ttm_pool.c
>>> +++ b/drivers/gpu/drm/ttm/ttm_pool.c
>>> @@ -812,7 +812,7 @@ int ttm_pool_mgr_init(unsigned long num_pages)
>>> &ttm_pool_debugfs_shrink_fops);
>>> #endif
>>>
>>> - mm_shrinker = shrinker_alloc(0, "drm-ttm_pool");
>>> + mm_shrinker = shrinker_alloc(SHRINKER_NUMA_AWARE,
>>> + "drm-ttm_pool");
> You also need to make ttm_pool_shrink() actually use the nid.
>
> Yeah, Did you mean setting the nid of the shrinker control structure from something like ttm_global_init() -passes NUMA node id dev_to_node(dev) to ttm_pool_mgr_init and use it to set the mm_shrinker->sc.nid ?
No, the nid needs to be passed in as parameter to ttm_pool_shrink(). See
function ttm_pool_shrinker_scan()
Regards,
Christian.
>
> Just setting the flag won't really help us.
>
> Regards,
> Christian.
>
>>> if (!mm_shrinker)
>>> return -ENOMEM;
>>>
>>> --
>>> 2.34.1
>>>
prev parent reply other threads:[~2024-07-03 6:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240702173048.2286044-1-rajneesh.bhardwaj@amd.com>
2024-07-02 18:19 ` [PATCH 1/2] drm/ttm: Allow direct reclaim to allocate local memory Alex Deucher
[not found] ` <20240702173048.2286044-2-rajneesh.bhardwaj@amd.com>
2024-07-02 18:20 ` [PATCH 2/2] drm/ttm: Make ttm shrinkers NUMA aware Alex Deucher
2024-07-02 18:24 ` Christian König
2024-07-02 21:54 ` Bhardwaj, Rajneesh
2024-07-03 6:53 ` Christian König [this message]
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=920e08ca-1318-4c0f-b1dc-b335c00302b1@amd.com \
--to=christian.koenig@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Felix.Kuehling@amd.com \
--cc=Rajneesh.Bhardwaj@amd.com \
--cc=alexdeucher@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
/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