From: Rodrigo Siqueira <siqueira@igalia.com>
To: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Cc: igt-dev@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
amd-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
"Christian Koenig" <christian.koenig@amd.com>,
maarten.lankhorst@linux.intel.com,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Kamil Konieczny" <kamil.konieczny@linux.intel.com>,
"Janusz Krzysztofik" <janusz.krzysztofik@linux.intel.com>,
"Vitaly Prosyak" <vitaly.prosyak@amd.com>,
"Natalie Vock" <natalie.vock@gmx.de>,
"Tvrtko Ursulin" <tvrtko.ursulin@igalia.com>,
kernel-dev@igalia.com
Subject: Re: [PATCH i-g-t v3 0/7] add dmem_cgroups test
Date: Mon, 6 Jul 2026 10:48:22 -0600 [thread overview]
Message-ID: <akvbAndvXJBGFS6O@atmagalia> (raw)
In-Reply-To: <20260702130108.1397444-1-cascardo@igalia.com>
On 07/02, Thadeu Lima de Souza Cascardo wrote:
> v3 TLDR:
> Sending again for fixes when running on top of Xe.
>
> This patchset is based on the work of Thomas Hellström at [1] and a
> followup I have submitted at [2]. This is now a v3, since I submitted [6].
>
> With this version, I reverted the order in which to apply the patchsets, as
> this one adds the infrastructure and the drivers mechanisms, and a test for
> dmem.current and its behavior around dmem.max that is currently supported
> in the kernel.
>
> As for the new dmem.max eviction behavior, introduced by [3], it has been
> pushed to a branch at [4]. If preferred, I can submit the two patches
> independently.
>
> I have run the tests, including the ones that test dmem.max eviction
> behavior on a system with a 1GiB VRAM amdgpu card. Rodrigo Siqueira helped
> me run it on a Xe system. We have applied the patchset at [3] on top of
> current linux origin/master [5], with a fixup for the amdgpu driver.
>
> Now, for the changes since v1 [2]:
> - Changed the test name from drv_dmem_cgroups to dmem_cgroups.
> - Have system includes before igt ones.
> - Documented the current SUBTEST.
> - Changed free_vram driver hook to only release a given BO. This allows for
> the eviction trigger by a new allocation added by write_eviction_nonblock
> subtest.
> - Changed allocate_vram to keep more state necessary for releasing a single BO.
> - Added a global free_vram helper to free all allocated VRAM.
>
> Compared to v3 of [1]:
> - I have kept wait_for_usage_drop as release can be lazy and we test for it
> on test_current SUBTEST, but had USAGE_DROP_TIMEOUT_MS be a little
> longer.
> - Changed BO_SIZE and EVICT_STEP to allow for more than two eviction steps
> on a 1GiB VRAM system.
> - Reduced USAGE_SLACK to avoid false positives, but still allow for some
> page table accounting.
>
> Compared to v2 of this one [6]:
>
> - Ignore -ENOMEM and -ENOSPC when trying to fill VRAM.
> - When limiting max memory, allow for some slack, as there might be some
> overhead.
> - On Xe, allocate GEM object with no deferred backing, and skip binding.
Hi,
I tested this series with the following hardware:
- RX9060XT
- RX570
- Intel ARC B580
Based on that, this series was:
Tested-by: Rodrigo Siqueira <siqueira@igalia.com>
Thanks
>
> [1] https://patchwork.freedesktop.org/series/163935/#rev3
> [2] https://patchwork.freedesktop.org/series/166496/
> [3] https://lore.kernel.org/dri-devel/20260611173301.17473-1-thomas.hellstrom@linux.intel.com/
> [4] https://gitlab.freedesktop.org/cascardo/igt-gpu-tools/-/commits/dmem_max?ref_type=heads
> [5] 502d801f0ab0 ("Merge tag 'erofs-for-7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs")
> [6] https://lore.kernel.org/dri-devel/20260623174319.4138648-1-cascardo@igalia.com/
>
>
> Thadeu Lima de Souza Cascardo (4):
> lib/xe: Introduce dmem driver and implement Xe support
> lib/amdgpu: add amdgpu_cgroup_region_name
> lib/amdgpu: add amdgpu support to igt_dmem_driver
> tests/dmem_cgroups: add test for dmem.current
>
> Thomas Hellström (3):
> lib/igt_cgroup: add cgroup v2 and dmem controller helpers
> tests/cgroup_dmem: add dmem cgroup controller test
> lib/xe: add xe_cgroup_region_name() helper
>
> lib/amdgpu/amd_dmem.c | 99 +++++++
> lib/amdgpu/amd_memory.c | 25 ++
> lib/amdgpu/amd_memory.h | 2 +
> lib/igt.h | 1 +
> lib/igt_cgroup.c | 638 ++++++++++++++++++++++++++++++++++++++++
> lib/igt_cgroup.h | 56 ++++
> lib/igt_dmem_driver.h | 25 ++
> lib/meson.build | 3 +
> lib/xe/xe_dmem.c | 143 +++++++++
> lib/xe/xe_query.c | 32 ++
> lib/xe/xe_query.h | 2 +
> tests/cgroup_dmem.c | 92 ++++++
> tests/dmem_cgroups.c | 245 +++++++++++++++
> tests/meson.build | 2 +
> 14 files changed, 1365 insertions(+)
> create mode 100644 lib/amdgpu/amd_dmem.c
> create mode 100644 lib/igt_cgroup.c
> create mode 100644 lib/igt_cgroup.h
> create mode 100644 lib/igt_dmem_driver.h
> create mode 100644 lib/xe/xe_dmem.c
> create mode 100644 tests/cgroup_dmem.c
> create mode 100644 tests/dmem_cgroups.c
>
> --
> 2.47.3
>
--
Rodrigo Siqueira
https://siqueira.tech
prev parent reply other threads:[~2026-07-06 16:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 13:00 [PATCH i-g-t v3 0/7] add dmem_cgroups test Thadeu Lima de Souza Cascardo
2026-07-02 13:00 ` [PATCH i-g-t v2 1/7] lib/igt_cgroup: add cgroup v2 and dmem controller helpers Thadeu Lima de Souza Cascardo
2026-07-02 13:00 ` [PATCH i-g-t v2 2/7] tests/cgroup_dmem: add dmem cgroup controller test Thadeu Lima de Souza Cascardo
2026-07-02 13:00 ` [PATCH i-g-t v2 3/7] lib/xe: add xe_cgroup_region_name() helper Thadeu Lima de Souza Cascardo
2026-07-02 13:00 ` [PATCH i-g-t v2 4/7] lib/xe: Introduce dmem driver and implement Xe support Thadeu Lima de Souza Cascardo
2026-07-02 13:00 ` [PATCH i-g-t v2 5/7] lib/amdgpu: add amdgpu_cgroup_region_name Thadeu Lima de Souza Cascardo
2026-07-02 13:00 ` [PATCH i-g-t v2 6/7] lib/amdgpu: add amdgpu support to igt_dmem_driver Thadeu Lima de Souza Cascardo
2026-07-02 13:00 ` [PATCH i-g-t v2 7/7] tests/dmem_cgroups: add test for dmem.current Thadeu Lima de Souza Cascardo
2026-07-07 11:07 ` Kamil Konieczny
2026-07-03 9:54 ` [PATCH i-g-t v3 0/7] add dmem_cgroups test Sokolowski, Jan
2026-07-03 11:18 ` Thadeu Lima de Souza Cascardo
2026-07-07 10:42 ` Kamil Konieczny
2026-07-06 16:48 ` Rodrigo Siqueira [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=akvbAndvXJBGFS6O@atmagalia \
--to=siqueira@igalia.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=cascardo@igalia.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=janusz.krzysztofik@linux.intel.com \
--cc=kamil.konieczny@linux.intel.com \
--cc=kernel-dev@igalia.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=natalie.vock@gmx.de \
--cc=thomas.hellstrom@linux.intel.com \
--cc=tvrtko.ursulin@igalia.com \
--cc=vitaly.prosyak@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