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] drm/ttm: Fix GPU MM stats during pool shrinking
Date: Fri, 1 May 2026 17:05:14 -0700 [thread overview]
Message-ID: <18c48e7f-a2bd-4e74-9262-266cd5c2fde8@panix.com> (raw)
In-Reply-To: <20260501223003.2648450-1-matthew.brost@intel.com>
On 5/1/26 15:30, 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.
OK, so why/how does "bonnie++" increase the GPU Memory size?
----
SwapTotal: 33554428 kB
MemTotal: 32345672 kB
GPUReclaim: 621568 kB
GPUActive: 453592 kB
SwapTotal: 33554428 kB
MemTotal: 32345672 kB
GPUActive: 5554976 kB
GPUReclaim: 12716 kB
SwapTotal: 33554428 kB
MemTotal: 32345672 kB
GPUActive: 18407272 kB
GPUReclaim: 884 kB
SwapTotal: 33554428 kB
MemTotal: 32345672 kB
GPUActive: 24022916 kB
GPUReclaim: 716 kB
SwapTotal: 33554428 kB
MemTotal: 32345672 kB
GPUActive: 25258248 kB
GPUReclaim: 16032 kB
SwapTotal: 33554428 kB
MemTotal: 32345672 kB
GPUActive: 28207188 kB
GPUReclaim: 3684 kB
----
... and I'm now not so sure the patch is working ... this after a 2nd
bonnie run:
----
GPUActive: 44357100 kB
SwapTotal: 33554428 kB
MemTotal: 32345672 kB
GPUReclaim: 94864 kB
GPUActive: 44373904 kB
SwapTotal: 33554428 kB
MemTotal: 32345672 kB
GPUReclaim: 94996 kB
GPUActive: 44354940 kB
SwapTotal: 33554428 kB
MemTotal: 32345672 kB
GPUReclaim: 98048 kB
GPUActive: 44769340 kB
SwapTotal: 33554428 kB
MemTotal: 32345672 kB
GPUReclaim: 122996 kB
----
-Kenny
--
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: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-01 22:30 [PATCH] drm/ttm: Fix GPU MM stats during pool shrinking Matthew Brost
2026-05-01 22:36 ` ✗ CI.checkpatch: warning for " Patchwork
2026-05-01 22:37 ` ✓ CI.KUnit: success " Patchwork
2026-05-01 22:57 ` [PATCH] " Kenneth Crudup
2026-05-01 23:28 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-05-02 0:05 ` Kenneth Crudup [this message]
2026-05-02 4:12 ` [PATCH] " Matthew Brost
2026-05-02 4:13 ` Matthew Brost
2026-05-02 0:48 ` ✗ Xe.CI.FULL: failure for " 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=18c48e7f-a2bd-4e74-9262-266cd5c2fde8@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