From: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
To: Krzysztof Karas <krzysztof.karas@intel.com>,
<intel-gfx@lists.freedesktop.org>
Cc: Jani Nikula <jani.nikula@linux.intel.com>,
Matthew Auld <matthew.auld@intel.com>,
Chris Wilson <chris.p.wilson@linux.intel.com>,
"Andi Shyti" <andi.shyti@linux.intel.com>,
Krzysztof Niemiec <krzysztof.niemiec@intel.com>,
Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Subject: Re: [PATCH v6] drm/i915/selftests: Keep mock file open during unfaultable migrate with fill
Date: Wed, 21 Jan 2026 11:27:14 +0100 [thread overview]
Message-ID: <DFU722D101XN.XSKQCV2BXD2L@intel.com> (raw)
In-Reply-To: <6xc74s3mbmtliqxihtxbok32jobhc26vfm5mu6cod4ywov6utf@ujp3rmqcwmr3>
Hi Krzysztof,
On Wed Jan 14, 2026 at 5:04 PM CET, Krzysztof Karas wrote:
> igt_mmap_migrate() tests migration with various parameters.
> In one of the cases, where FILL and UNFAULTABLE flags are set,
> during first stages of this test, a mock file is opened in
> igt_mmap_offset(), which results in allocating GEM objects for
> page table structures and scratch in GPU mappable memory.
>
> Then, also in igt_mmap_offset(), the file is closed (fput) and
> the cleanup of these objects is scheduled on a delayed worqueue,
> which is designed to execute after unspecified amount of time.
>
> Next, the test calls igt_fill_mappable() to fill mappable GPU
> memory. At this point, three scenarios are possible
> (N = max size of GPU memory for this test in MiB):
> 1) the objects allocated for the mock file get cleaned up after
> crucial part of the test is over, so the memory is full with
> the 1 MiB they occupy and N - 1 MiB added by
> igt_fill_mappable(), so the migration fails properly;
> 2) the object cleanup fires before igt_fill_mappable()
> completes, so the whole memory is populated with N MiB from
> igt_fill_mappable(), so migration fails as well;
> 3) the object cleanup is performed right after fill is done,
> so only N - 1 MiB are in the mappable portion of GPU memory,
> allowing the migration to succeed - we'd expect no space
> left to perform migration, but an object was able to fit in
> the remaining 1 MiB, which caused get_user() to succeed, so
> a page fault did not fail.
>
> The test incorrectly assumes that the GPU mappable memory state
> is unchanging during the test. Amend this by keeping the mock
> file open until migration and page fault checking is complete.
>
> Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13929
> Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Looks good to me.
Reviewed-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
--
Best regards,
Sebastian
next prev parent reply other threads:[~2026-01-21 10:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-14 16:04 [PATCH v6] drm/i915/selftests: Keep mock file open during unfaultable migrate with fill Krzysztof Karas
2026-01-14 17:42 ` ✗ i915.CI.BAT: failure for drm/i915/selftests: Keep mock file open during unfaultable migrate with fill (rev8) Patchwork
2026-01-15 9:06 ` Krzysztof Karas
2026-01-21 10:27 ` Sebastian Brzezinka [this message]
2026-01-27 16:30 ` [PATCH v6] drm/i915/selftests: Keep mock file open during unfaultable migrate with fill Andi Shyti
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=DFU722D101XN.XSKQCV2BXD2L@intel.com \
--to=sebastian.brzezinka@intel.com \
--cc=andi.shyti@linux.intel.com \
--cc=chris.p.wilson@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=krzysztof.karas@intel.com \
--cc=krzysztof.niemiec@intel.com \
--cc=matthew.auld@intel.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