From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: "Eduardo P. Gomez" <eduardoprocopiogomez@gmail.com>
Cc: Natalie Vock <nat@pixelcluster.dev>,
Arun Pravin <arunpravin.paneerselvam@amd.com>,
dri-devel@lists.freedesktop.org,
Matthew Auld <matthew.auld@intel.com>,
Matthew Brost <matthew.brost@intel.com>
Subject: Re: [RFC PATCH 0/2] drm/ttm: fix excessive idle memory retention
Date: Wed, 25 Nov 2026 16:47:20 +0100 [thread overview]
Message-ID: <ff8167523ddaa4b6e2d59be81cb06ff663251c0e.camel@linux.intel.com> (raw)
In-Reply-To: <CAKL2PNo7Vp7O4FRWGPV-ZuSqk60B4xh4pXUzcgYEEdqm_sUemg@mail.gmail.com>
On Wed, 2026-11-25 at 10:27 -0300, Eduardo P. Gomez wrote:
> (sending a copy to the mail list)
>
> Hi Thomas,
>
> Under memory pressure, the existing shrinker indeed worked in my
> unpatched
> 7.4-rc4 QEMU test. It reclaimed all 768 MiB, and the competing
> allocation
> completed.
>
> And yes, I'm actually facing out of memory freezes on my 32 GiB
> desktop. My
> early investigations showed GPUReclaim was using most of my RAM (the
> test
> repo is the result of my last test before creating the patch). The
> tests
> shows GPUReclaim stayed at 12.25 GiB of 32 GiB for at least 60
> seconds
> after the reproducer exited. In a separate 8 GiB desktop run with v3,
> it
> dropped to about 128 MiB by the five-second sample.
>
> Once the allocation burst is over, what benefit do we get from
> keeping the
> full pool until memory pressure, compared with trimming the excess
> after a
> short window for reuse? My concern is the cost of reclaiming a pool
> that
> large when another workload already needs the memory.
The benefit is that since it is costly to transition memory from WC to
WB, we do it only on demand. The kernel can't guess whether the next
application to be used requires a lot of GPU memory or not. And we
don't need to add complexity to go beyond the core reclaim mechanisms.
But the allocation latency didn't seem to be the trigger for this work,
rather unexpected OOMS. Did you actually see any instance of remaining
GPUReclaim memory when OOM was hit?
Thanks,
Thomas
>
> If you’d like to try the standalone reproducer at 8 GiB, I’d be
> interested
> to see how long a competing allocation takes on the unpatched kernel
> once
> it needs memory back from the pool.
>
> Thanks,
> Eduardo
next prev parent reply other threads:[~2026-11-25 15:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 22:28 [RFC PATCH 0/2] drm/ttm: fix excessive idle memory retention Eduardo P. Gomez
2026-11-24 22:28 ` [RFC PATCH 1/2] drm/ttm: reclaim pooled pages after a period of inactivity Eduardo P. Gomez
2026-11-25 9:04 ` sashiko-bot
2026-11-24 22:28 ` [RFC PATCH 2/2] drm/ttm: retain a reserve during idle pool reclaim Eduardo P. Gomez
2026-11-25 9:00 ` sashiko-bot
2026-11-25 10:14 ` [RFC PATCH 0/2] drm/ttm: fix excessive idle memory retention Thomas Hellström
2026-11-25 13:27 ` Eduardo P. Gomez
2026-11-25 15:47 ` Thomas Hellström [this message]
2026-11-25 19:36 ` Eduardo P. Gomez
2026-11-26 10:35 ` Thomas Hellström
2026-11-29 3:46 ` Eduardo P. Gomez
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=ff8167523ddaa4b6e2d59be81cb06ff663251c0e.camel@linux.intel.com \
--to=thomas.hellstrom@linux.intel.com \
--cc=arunpravin.paneerselvam@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=eduardoprocopiogomez@gmail.com \
--cc=matthew.auld@intel.com \
--cc=matthew.brost@intel.com \
--cc=nat@pixelcluster.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.