public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v2 0/3] tests/intel/gem_lmem_swapping: Expect gem leak helper crashes
@ 2026-03-12 18:07 Janusz Krzysztofik
  2026-03-12 18:07 ` [PATCH i-g-t v2 1/3] tests/gem_lmem_swapping: Improve concurrency of smem-oom helpers Janusz Krzysztofik
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Janusz Krzysztofik @ 2026-03-12 18:07 UTC (permalink / raw)
  To: igt-dev
  Cc: intel-gfx, Kamil Konieczny, Zbigniew Kempczyński,
	Thomas Hellström, Andi Shyti, Krzysztof Karas,
	Krzysztof Niemiec, Sebastian Brzezinka, Janusz Krzysztofik

When trying to exhaust system memory in order to exercise LMEM eviction
under OOM conditions, a gem_leak helper process may itself become a victim
of memory shortage.  If our i915 TTM VM fault handler fails to allocate a
page and responds with a SIGBUS signal when the helper process is trying
to store data in a mmaped i915 GEM object with memset then the process
crashes.  Unfortunately, such crash is not only reported on stdout, strerr
and dmesg as premature, additional result from the subtest while it is
still in progress, but also renders the final result as failed.

Since page allocation failures are unavoidable under OOM conditions, and
the SIGBUS signal response from our TTM fault handler is correct in such
cases, catch those signals and let the helper process continue.

While being at it, improve concurrency of smem-oom helpers and be more
clear about their supplementary role.
 
v2: Add 2 introductory patches that make the code more predictable and
    clear,
  - add a comment about no need to restore default SIGBUS handler (Kamil),
  - fix missing initialization of sa.sa_mask with sigemptyset().

Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>

Janusz Krzysztofik (3):
  tests/gem_lmem_swapping: Improve concurrency of smem-oom helpers.
  tests/intel/gem_lmem_swapping: Be more clear about subprocesses role
  tests/intel/gem_lmem_swapping: Expect gem leak helper crashes

 tests/intel/gem_lmem_swapping.c | 60 +++++++++++++++++++++++++--------
 1 file changed, 46 insertions(+), 14 deletions(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-03-19  9:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-12 18:07 [PATCH i-g-t v2 0/3] tests/intel/gem_lmem_swapping: Expect gem leak helper crashes Janusz Krzysztofik
2026-03-12 18:07 ` [PATCH i-g-t v2 1/3] tests/gem_lmem_swapping: Improve concurrency of smem-oom helpers Janusz Krzysztofik
2026-03-13 14:47   ` Kamil Konieczny
2026-03-19  7:06   ` Krzysztof Karas
2026-03-12 18:07 ` [PATCH i-g-t v2 2/3] tests/intel/gem_lmem_swapping: Be more clear about subprocesses role Janusz Krzysztofik
2026-03-13 14:45   ` Kamil Konieczny
2026-03-19  7:20   ` Krzysztof Karas
2026-03-19  9:28     ` Janusz Krzysztofik
2026-03-12 18:07 ` [PATCH i-g-t v2 3/3] tests/intel/gem_lmem_swapping: Expect gem leak helper crashes Janusz Krzysztofik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox