From: "Christian König" <christian.koenig@amd.com>
To: Alex Deucher <alexdeucher@gmail.com>,
Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com>,
Maling list - DRI developers <dri-devel@lists.freedesktop.org>
Cc: amd-gfx@lists.freedesktop.org, felix.kuehling@amd.com,
alexander.deucher@amd.com
Subject: Re: [PATCH 2/2] drm/ttm: Make ttm shrinkers NUMA aware
Date: Tue, 2 Jul 2024 20:24:39 +0200 [thread overview]
Message-ID: <efc11b48-ccc1-4bdf-9585-a66edfa6307e@amd.com> (raw)
In-Reply-To: <CADnq5_MU-j1sBYn-7dzvEKF73VBc=bcYOYY0AcbPjrJnKB24Zg@mail.gmail.com>
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.
Just setting the flag won't really help us.
Regards,
Christian.
>> if (!mm_shrinker)
>> return -ENOMEM;
>>
>> --
>> 2.34.1
>>
next prev parent reply other threads:[~2024-07-02 18:24 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 [this message]
2024-07-02 21:54 ` Bhardwaj, Rajneesh
2024-07-03 6:53 ` 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=efc11b48-ccc1-4bdf-9585-a66edfa6307e@amd.com \
--to=christian.koenig@amd.com \
--cc=alexander.deucher@amd.com \
--cc=alexdeucher@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=felix.kuehling@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