Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Summers, Stuart" <stuart.summers@intel.com>
To: "Cavitt, Jonathan" <jonathan.cavitt@intel.com>
Cc: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t] tests/intel/xe_exec_reset: Add a vm_unbind after the stress test completes
Date: Mon, 13 Jan 2025 16:00:24 +0000	[thread overview]
Message-ID: <b2947f22bcd6921688b404c2ab6ea1056b433f23.camel@intel.com> (raw)
In-Reply-To: <63cc246d2c4e3929dedce3058cd93d9e17ba1a83.camel@intel.com>

On Thu, 2025-01-09 at 15:39 +0000, Summers, Stuart wrote:
> On Wed, 2025-01-08 at 23:38 +0000, Cavitt, Jonathan wrote:
> > -----Original Message-----
> > From: igt-dev <igt-dev-bounces@lists.freedesktop.org> On Behalf Of
> > Stuart Summers
> > Sent: Wednesday, January 8, 2025 2:54 PM
> > Cc: igt-dev@lists.freedesktop.org; Summers, Stuart
> > <stuart.summers@intel.com>
> > Subject: [PATCH i-g-t] tests/intel/xe_exec_reset: Add a vm_unbind
> > after the stress test completes
> > > 
> > > The test is submitting workloads in a tight loop and then
> > > destroying the exec queue for each of these. There is a
> > > potential that the GuC IDs could get used up during these
> > > submissions and before a GT reset goes through. If that
> > > happens, the subsequent submissions will essentially be
> > > "lost" in that they aren't submitted to GuC and just wait
> > > for a submission timeout to happen, at which point we do
> > > a reset_async in the driver. What seems to be happening
> > > however is these workloads are lingering beyond the
> > > completion of the xe_exec_reset test. Then when the
> > > reset_async eventually goes through, the submissions
> > > from a next test can also hang (or possibly because
> > > they too ran into the guc_id exhaustion case).
> > > 
> > > Add an explicit vm_unbind before destroying the VM
> > > to give time for those submissions to complete
> > > before the test ends.
> > > 
> > > https://gitlab.freedesktop.org/drm/xe/kernel/issues/4015
> > 
> > I think this needs to be:
> > Closes: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4015
> 
> Ok I'll update. 
> 
> > But otherwise:
> > Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
> 
> Thanks!
> 
> > Well, assuming this works, at least.  I might be reading a bit too
> > far into the
> > commit message and kernel issue comment, but it seems you aren't
> > too
> > certain this will work?
> 
> Yeah before merging I need to make sure this fully fixes the issue :)
> This particular test was already passing so just need to review the
> logs and make sure the cleanup is consistently happening. I'll report
> back here with the details...

Ok I've done quite a bit of testing here over the past couple of days
and I can't reproduce this behavior on the latest without the IGT
change I have here. Let's drop this change for now. If this pops back
up we can revisit. Thanks for the look here Jonathan!

-Stuart

> 
> Thanks,
> Stuart
> 
> > -Jonathan Cavitt
> > 
> > > 
> > > Signed-off-by: Stuart Summers <stuart.summers@intel.com>
> > > ---
> > >  tests/intel/xe_exec_reset.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> > > 
> > > diff --git a/tests/intel/xe_exec_reset.c
> > > b/tests/intel/xe_exec_reset.c
> > > index a3eaf8bbf..ca5566d11 100644
> > > --- a/tests/intel/xe_exec_reset.c
> > > +++ b/tests/intel/xe_exec_reset.c
> > > @@ -645,6 +645,8 @@ static void submit_jobs(struct gt_thread_data
> > > *t)
> > >                 xe_exec_queue_destroy(fd, exec.exec_queue_id);
> > >         }
> > >  
> > > +       xe_vm_unbind_sync(fd, vm, 0, addr, bo_size);
> > > +
> > >         munmap(data, bo_size);
> > >         gem_close(fd, bo);
> > >         xe_vm_destroy(fd, vm);
> > > -- 
> > > 2.34.1
> > > 
> > > 
> 


  reply	other threads:[~2025-01-13 16:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-08 22:54 [PATCH i-g-t] tests/intel/xe_exec_reset: Add a vm_unbind after the stress test completes Stuart Summers
2025-01-08 23:38 ` Cavitt, Jonathan
2025-01-09 15:39   ` Summers, Stuart
2025-01-13 16:00     ` Summers, Stuart [this message]
2025-01-09  0:21 ` ✓ Xe.CI.BAT: success for " Patchwork
2025-01-09  0:31 ` ✓ i915.CI.BAT: " Patchwork
2025-01-11  2:32 ` ✗ Xe.CI.Full: failure " Patchwork
2025-01-11  4:36 ` ✗ i915.CI.Full: " 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=b2947f22bcd6921688b404c2ab6ea1056b433f23.camel@intel.com \
    --to=stuart.summers@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jonathan.cavitt@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