From: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org,
"Kamil Konieczny" <kamil.konieczny@linux.intel.com>,
"Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>,
"Chris Wilson" <chris.p.wilson@linux.intel.com>,
"Janusz Krzysztofik" <janusz.krzysztofik@linux.intel.com>
Subject: [PATCH i-g-t v2 2/2] tests/gem_mmap_offset: Fix OOM hits
Date: Thu, 28 Nov 2024 12:16:36 +0100 [thread overview]
Message-ID: <20241128111822.836089-6-janusz.krzysztofik@linux.intel.com> (raw)
In-Reply-To: <20241128111822.836089-4-janusz.krzysztofik@linux.intel.com>
The 'clear' subtest exercises correctness of object memory clearing on
passing a batch with the object to GPU for processing. The exercise is
executed in several parallel threads, one per CPU. Each thread repeats
the exercise in a time only limited loop, with no delay between
consecutive iterations. In case of system memory objects, that happens
to exhaust all available physical memory, which is neither the goal nor
requirement of the exercise.
Make sure sufficient amount of physical memory is available before calling
another execbuf.
v2: Limit the scope of the fix to SMEM exercise.
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11738
Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
---
tests/intel/gem_mmap_offset.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/intel/gem_mmap_offset.c b/tests/intel/gem_mmap_offset.c
index 20dca17378..8ce10d6144 100644
--- a/tests/intel/gem_mmap_offset.c
+++ b/tests/intel/gem_mmap_offset.c
@@ -745,6 +745,9 @@ static void *thread_clear(void *data)
npages = get_npages(&arg->max, npages);
size = npages << 12;
+ /* Execbuf requires sufficient amount of free physical memory */
+ if (arg->flags & CLEAR_IN_EXECBUF && arg->region.memory_class == I915_MEMORY_CLASS_SYSTEM)
+ igt_require_memory(1, size, CHECK_RAM);
igt_assert_eq(__gem_create_in_memory_region_list(i915, &handle, &size, 0, &arg->region, 1), 0);
/* Zero-init bo in execbuf or pagefault handler path as requested */
if (arg->flags & CLEAR_IN_EXECBUF)
--
2.47.0
next prev parent reply other threads:[~2024-11-28 11:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-28 11:16 [PATCH i-g-t v2 0/2] tests/gem_mmap_offset: Fix OOM hits Janusz Krzysztofik
2024-11-28 11:16 ` [PATCH i-g-t v2 1/2] tests/gem_mmap_offset: Split 'clear' subtest Janusz Krzysztofik
2024-11-28 11:56 ` Andi Shyti
2024-11-28 11:16 ` Janusz Krzysztofik [this message]
2024-11-28 11:56 ` [PATCH i-g-t v2 2/2] tests/gem_mmap_offset: Fix OOM hits Andi Shyti
2024-11-28 13:56 ` ✓ Xe.CI.BAT: success for tests/gem_mmap_offset: Fix OOM hits (rev2) Patchwork
2024-11-28 14:05 ` ✓ i915.CI.BAT: " Patchwork
2024-11-28 17:05 ` ✗ Xe.CI.Full: failure " Patchwork
2024-11-29 15:06 ` Janusz Krzysztofik
2024-11-28 17:16 ` ✗ i915.CI.Full: " Patchwork
2024-11-29 14:59 ` Janusz Krzysztofik
2024-12-03 4:37 ` Illipilli, TejasreeX
2024-12-02 13:07 ` ✓ i915.CI.Full: success " 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=20241128111822.836089-6-janusz.krzysztofik@linux.intel.com \
--to=janusz.krzysztofik@linux.intel.com \
--cc=chris.p.wilson@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=zbigniew.kempczynski@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