public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
To: Krzysztof Karas <krzysztof.karas@intel.com>
Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	"Kamil Konieczny" <kamil.konieczny@linux.intel.com>,
	"Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>,
	"Thomas Hellström" <thomas.hellstrom@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 i-g-t v2 2/3] tests/intel/gem_lmem_swapping: Be more clear about subprocesses role
Date: Thu, 19 Mar 2026 10:28:55 +0100	[thread overview]
Message-ID: <5a76f225fb902ef2294de5730d81e489ce17f7eb.camel@linux.intel.com> (raw)
In-Reply-To: <nafdnlx2pxm2zj46s72qjt3glrgdjuk4monbuz7zpj4uomzulv@o7oeaykwokit>

Hi Krzysztof,

Thanks for looking into this.

On Thu, 2026-03-19 at 07:20 +0000, Krzysztof Karas wrote:
> Hi Janusz,
> 
> > In the smem-oom subtest, helper processes are now spawn with igt_fork(),
> > not with igt_fork_helper() as one might expect.  That unfortunate use
> > of igt_fork() may introduce uncertainty about the role of those
> > subprocesses, whether their failures should count or not.
> > 
> > Use igt_fork_helper() for clarity.
> > 
> > Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
> > ---
> >  tests/intel/gem_lmem_swapping.c | 12 ++++++++----
> >  1 file changed, 8 insertions(+), 4 deletions(-)
> > 
> > diff --git a/tests/intel/gem_lmem_swapping.c b/tests/intel/gem_lmem_swapping.c
> > index 3a35318a74..f790dc66e9 100644
> > --- a/tests/intel/gem_lmem_swapping.c
> > +++ b/tests/intel/gem_lmem_swapping.c
> > @@ -737,7 +737,9 @@ static void test_smem_oom(int i915,
> >  	/* smem memory hog processes, respawn till the lmem process completes */
> >  	igt_fork_helper(&smem_loop[0]) {
> >  		while (!READ_ONCE(*lmem_done)) {
> > -			igt_fork(child, 1) {
> > +			struct igt_helper_process smem_proc = {};
> > +
> > +			igt_fork_helper(&smem_proc) {
> >  				for (int pass = 0; pass < num_alloc; pass++) {
> >  					if (READ_ONCE(*lmem_done))
> >  						break;
> > @@ -749,12 +751,14 @@ static void test_smem_oom(int i915,
> >  			 * killed by the oom killer, don't call
> >  			 * igt_waitchildren because of the noise
> >  			 */
> This comment is no longer applicable, you should remove it.
> igt_waitchildren() is supposed to be for igt_fork-ed processes,
> so as you change the background fork to igt_helper_process type,
> this may be confusing if left in the code.

You are right, and my intention was like that but I missed it.
Unfortunately, the patch has been already applied to upstream.  But
that's not a problem, I'll prepare a follow-up patch with that fixed.

Thanks,
Janusz


> 
> After that change, feel free to add:
> Revieved-by: Krzysztof Karas <krzysztof.karas@intel.com>
> 
> > -			wait(NULL);
> > +			igt_wait_helper(&smem_proc);
> >  		}
> >  	}
> >  	igt_fork_helper(&smem_loop[1]) {
> >  		while (!READ_ONCE(*lmem_done)) {
> > -			igt_fork(child, 1) {
> > +			struct igt_helper_process smem_proc = {};
> > +
> > +			igt_fork_helper(&smem_proc) {
> >  				int fd = drm_reopen_driver(i915);
> >  
> >  				for (int pass = 0; pass < num_alloc; pass++) {
> > @@ -764,7 +768,7 @@ static void test_smem_oom(int i915,
> >  				}
> >  				drm_close_driver(fd);
> >  			}
> > -			wait(NULL);
> > +			igt_wait_helper(&smem_proc);
> >  		}
> >  	}
> >  
> > -- 
> > 2.53.0
> > 

  reply	other threads:[~2026-03-19  9:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2026-03-12 18:07 ` [PATCH i-g-t v2 3/3] tests/intel/gem_lmem_swapping: Expect gem leak helper crashes Janusz Krzysztofik

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=5a76f225fb902ef2294de5730d81e489ce17f7eb.camel@linux.intel.com \
    --to=janusz.krzysztofik@linux.intel.com \
    --cc=andi.shyti@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=krzysztof.karas@intel.com \
    --cc=krzysztof.niemiec@intel.com \
    --cc=sebastian.brzezinka@intel.com \
    --cc=thomas.hellstrom@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