From: "Christian König" <christian.koenig@amd.com>
To: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Cc: "Tvrtko Ursulin" <tvrtko.ursulin@igalia.com>,
"Michel Dänzer" <michel.daenzer@mailbox.org>,
"Huang Rui" <ray.huang@amd.com>,
"Matthew Auld" <matthew.auld@intel.com>,
"Matthew Brost" <matthew.brost@intel.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, kernel-dev@igalia.com,
"Sergey Senozhatsky" <senozhatsky@chromium.org>
Subject: Re: [PATCH RFC v2 0/3] drm/ttm: allow direct reclaim to be skipped
Date: Fri, 19 Sep 2025 13:39:43 +0200 [thread overview]
Message-ID: <7c6a3aa0-c1eb-4726-988a-460c4895f615@amd.com> (raw)
In-Reply-To: <aM06y7MP6LzHMBK7@quatroqueijos.cascardo.eti.br>
On 19.09.25 13:13, Thadeu Lima de Souza Cascardo wrote:
>>>
>>>> The alternative I can offer is to disable the fallback which in your case would trigger the OOM killer.
>>>>
>
> Warning could be as simple as removing __GFP_NOWARN. But I don't think we
> want either a warning or to trigger the OOM killer when allocating lower
> order pages are still possible. That will already happen when we get to 0
> order pages, where there is no fallback available anymore, and, then, it
> makes sense to try harder and warn if no page can be allocated.
I don't think you understand the problem.
Allocating lower order pages is not really an alternative. You run into really a lot of technical issues with that.
The reason we have it is to prevent crashes in OOM situations. In other words still allow displaying warning messages for example.
> Under my current workload, the balance skews torwards 0-order pages,
> reducing the amount of 10 and 9 order pages to half, when comparing runs
> with direct reclaim and without direct reclaim.
That pretty much completely disqualifies this approach.
This is a clear indicator that your system simply doesn't have enough memory for the workload you are trying to run.
> So, I understand your
> concern in respect to the impact on the GPU TLB and potential flickering.
> Is there a way we can measure it on the devices we are using? And, then, if
> it does not show to be a problem on those devices, would making this be a
> setting per-device be acceptable to you? In a way that we could have in
> userspace a list of devices where it is okay to prefer not to reclaim over
> getting huge pages and that could be set if the workload prefers lower
> latency in those allocations?
No, you are clearly trying to run a use case which as far as I can see we can't really support without running into a lot of trouble sooner or later.
Regards,
Christian.
>
> Thanks.
> Cascardo.
>
>>>> Regards,
>>>> Christian.
>>>>
>>>>>
>>>>> Other drivers can later opt to use this mechanism too.
>>>>>
>>>>> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
>>>>> ---
>>>>> Changes in v2:
>>>>> - Make disabling direct reclaim an option.
>>>>> - Link to v1: https://lore.kernel.org/r/20250910-ttm_pool_no_direct_reclaim-v1-1-53b0fa7f80fa@igalia.com
>>>>>
>>>>> ---
>>>>> Thadeu Lima de Souza Cascardo (3):
>>>>> ttm: pool: allow requests to prefer latency over throughput
>>>>> ttm: pool: add a module parameter to set latency preference
>>>>> drm/amdgpu: allow allocation preferences when creating GEM object
>>>>>
>>>>> drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 3 ++-
>>>>> drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++-
>>>>> drivers/gpu/drm/ttm/ttm_pool.c | 23 +++++++++++++++++------
>>>>> drivers/gpu/drm/ttm/ttm_tt.c | 2 +-
>>>>> include/drm/ttm/ttm_bo.h | 5 +++++
>>>>> include/drm/ttm/ttm_pool.h | 2 +-
>>>>> include/drm/ttm/ttm_tt.h | 2 +-
>>>>> include/uapi/drm/amdgpu_drm.h | 9 +++++++++
>>>>> 8 files changed, 38 insertions(+), 11 deletions(-)
>>>>> ---
>>>>> base-commit: f83ec76bf285bea5727f478a68b894f5543ca76e
>>>>> change-id: 20250909-ttm_pool_no_direct_reclaim-ee0807a2d3fe
>>>>>
>>>>> Best regards,
>>>>
>>>
>>
prev parent reply other threads:[~2025-09-19 11:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-18 20:09 Thadeu Lima de Souza Cascardo
2025-09-18 20:09 ` [PATCH RFC v2 1/3] ttm: pool: allow requests to prefer latency over throughput Thadeu Lima de Souza Cascardo
2025-09-18 20:09 ` [PATCH RFC v2 2/3] ttm: pool: add a module parameter to set latency preference Thadeu Lima de Souza Cascardo
2025-09-18 20:09 ` [PATCH RFC v2 3/3] drm/amdgpu: allow allocation preferences when creating GEM object Thadeu Lima de Souza Cascardo
2025-09-19 6:46 ` [PATCH RFC v2 0/3] drm/ttm: allow direct reclaim to be skipped Christian König
2025-09-19 7:43 ` Tvrtko Ursulin
2025-09-19 8:01 ` Christian König
2025-09-19 8:46 ` Tvrtko Ursulin
2025-09-19 10:17 ` Christian König
2025-09-19 10:42 ` Tvrtko Ursulin
2025-09-19 12:04 ` Christian König
2025-09-19 11:13 ` Thadeu Lima de Souza Cascardo
2025-09-19 11:39 ` 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=7c6a3aa0-c1eb-4726-988a-460c4895f615@amd.com \
--to=christian.koenig@amd.com \
--cc=airlied@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=cascardo@igalia.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-dev@igalia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthew.auld@intel.com \
--cc=matthew.brost@intel.com \
--cc=michel.daenzer@mailbox.org \
--cc=mripard@kernel.org \
--cc=ray.huang@amd.com \
--cc=senozhatsky@chromium.org \
--cc=simona@ffwll.ch \
--cc=tvrtko.ursulin@igalia.com \
--cc=tzimmermann@suse.de \
/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
all inboxes | Powered by JetHome®