From: Kenneth Crudup <kenny@panix.com>
To: Matthew Brost <matthew.brost@intel.com>,
intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: Christian Koenig <christian.koenig@amd.com>,
Huang Rui <ray.huang@amd.com>,
Matthew Auld <matthew.auld@intel.com>,
David Airlie <airlied@gmail.com>
Subject: Re: [PATCH v2] drm/ttm: Fix GPU MM stats during pool shrinking
Date: Sat, 2 May 2026 01:14:38 -0700 [thread overview]
Message-ID: <7f927ef8-2d3d-4609-926d-b18535794f72@panix.com> (raw)
In-Reply-To: <20260502065338.2720646-1-matthew.brost@intel.com>
On 5/1/26 23:53, Matthew Brost wrote:
> TTM pool shrinking frees pages by calling __free_pages() directly,
> which bypasses updates to NR_GPU_ACTIVE and leaves GPU MM accounting
> out of sync.
>
> Introduce a helper, __free_pages_gpu_account(), and use it for all page
> frees in ttm_pool.c so GPU MM statistics are updated consistently.
>
> Reported-by: Kenneth Crudup <kenny@panix.com>
> Fixes: ae80122f3896 ("drm/ttm: use gpu mm stats to track gpu memory allocations. (v4)")
> Cc: Christian Koenig <christian.koenig@amd.com>
> Cc: Huang Rui <ray.huang@amd.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: David Airlie <airlied@gmail.com>
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
>
> ---
>
> v2:
Tested-By: Kenneth R. Crudup <kenny@panix.com>
I think this one got it right ... this is after two bonnie++ runs:
----
SwapFree: 33554428 kB
MemTotal: 32345768 kB
GPUActive: 676092 kB
GPUReclaim: 584272 kB
SwapFree: 33554428 kB
MemTotal: 32345768 kB
GPUActive: 750396 kB
GPUReclaim: 516348 kB
SwapFree: 33554428 kB
MemTotal: 32345768 kB
GPUActive: 801996 kB
GPUReclaim: 478756 kB
SwapFree: 33554428 kB
MemTotal: 32345768 kB
GPUActive: 794224 kB
GPUReclaim: 481624 kB
SwapFree: 33554428 kB
MemTotal: 32345768 kB
GPUActive: 351336 kB
GPUReclaim: 400 kB
SwapFree: 33554428 kB
MemTotal: 32345768 kB
GPUActive: 1015624 kB
GPUReclaim: 72 kB
SwapFree: 33554428 kB
MemTotal: 32345768 kB
GPUActive: 583176 kB
GPUReclaim: 48 kB
SwapFree: 33554428 kB
MemTotal: 32345768 kB
GPUActive: 737852 kB
GPUReclaim: 2524 kB
SwapFree: 33554428 kB
MemTotal: 32345768 kB
GPUActive: 1041056 kB
GPUReclaim: 308 kB
SwapFree: 33554428 kB
MemTotal: 32345768 kB
GPUActive: 1356568 kB
GPUReclaim: 109992 kB
SwapFree: 33554428 kB
MemTotal: 32345768 kB
GPUActive: 1181732 kB
GPUReclaim: 39000 kB
SwapFree: 33554428 kB
MemTotal: 32345768 kB
GPUActive: 989900 kB
GPUReclaim: 68 kB
SwapFree: 33554428 kB
MemTotal: 32345768 kB
GPUActive: 486720 kB
GPUReclaim: 544 kB
SwapFree: 33554428 kB
MemTotal: 32345768 kB
GPUActive: 687628 kB
GPUReclaim: 2280 kB
SwapFree: 33554428 kB
MemTotal: 32345768 kB
GPUActive: 634060 kB
GPUReclaim: 1000 kB
SwapFree: 33554428 kB
MemTotal: 32345768 kB
GPUActive: 1030168 kB
GPUReclaim: 1696 kB
SwapFree: 33554428 kB
MemTotal: 32345768 kB
GPUActive: 1323464 kB
GPUReclaim: 1392 kB
SwapFree: 33554428 kB
MemTotal: 32345768 kB
GPUActive: 1452340 kB
GPUReclaim: 20024 kB
----
-Kenny "yeah, I don't sleep much either" Crudup
--
Kenneth R. Crudup / Sr. SW Engineer, Scott County Consulting, Orange
County CA
next prev parent reply other threads:[~2026-05-04 12:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-02 6:53 [PATCH v2] drm/ttm: Fix GPU MM stats during pool shrinking Matthew Brost
2026-05-02 6:59 ` ✗ CI.checkpatch: warning for drm/ttm: Fix GPU MM stats during pool shrinking (rev2) Patchwork
2026-05-02 7:00 ` ✓ CI.KUnit: success " Patchwork
2026-05-02 7:54 ` ✓ Xe.CI.BAT: " Patchwork
2026-05-02 8:14 ` Kenneth Crudup [this message]
2026-05-04 3:56 ` [PATCH v2] drm/ttm: Fix GPU MM stats during pool shrinking Dave Airlie
2026-05-04 4:09 ` Matthew Brost
2026-05-02 9:03 ` ✗ Xe.CI.FULL: failure for drm/ttm: Fix GPU MM stats during pool shrinking (rev2) Patchwork
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=7f927ef8-2d3d-4609-926d-b18535794f72@panix.com \
--to=kenny@panix.com \
--cc=airlied@gmail.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
--cc=matthew.brost@intel.com \
--cc=ray.huang@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