All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Lionel Landwerlin <lionel.g.landwerlin@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v10 3/4] drm/i915/perf: prepare driver to receive multiple ctx handles
Date: Thu, 30 Apr 2020 15:55:05 +0100	[thread overview]
Message-ID: <158825850531.7361.958274130340194506@build.alporthouse.com> (raw)
In-Reply-To: <20200430135536.1141443-4-lionel.g.landwerlin@intel.com>

Quoting Lionel Landwerlin (2020-04-30 14:55:35)
> @@ -1382,6 +1446,12 @@ static void i915_oa_stream_destroy(struct i915_perf_stream *stream)
>  
>         BUG_ON(stream != perf->exclusive_stream);
>  
> +       err = intel_context_pin(stream->config_context);
> +       if (err) {
> +               drm_err(&perf->i915->drm,
> +                       "Error pinning i915-perf context\n");
> +       }

Reading through, this is the last thing that leapt out at me.

Taking an error here would be nasty, and we do allow the pin to be
interrupted (which would be a surprise for most people who call
close()).

The only suggestion I can make, is that the stream always keeps it
pinned.

From the robustness point of view, it's better if we break
stream->config_context than if we break stream->engine->kernel_context,
but equally pinning another context image [about 80k in total] just for
safety? Probably worth it. [If we break the kernel_context, we cannot do
hang detection or pm/idle, the driver comes grinding to a halt.]
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-04-30 14:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-30 13:55 [Intel-gfx] [PATCH v10 0/4] drm/i915/perf: Add support for multi context perf queries Lionel Landwerlin
2020-04-30 13:55 ` [Intel-gfx] [PATCH v10 1/4] drm/i915/perf: break OA config buffer object in 2 Lionel Landwerlin
2020-04-30 15:04   ` Chris Wilson
2020-04-30 13:55 ` [Intel-gfx] [PATCH v10 2/4] drm/i915/perf: stop using the kernel context Lionel Landwerlin
2020-04-30 13:55 ` [Intel-gfx] [PATCH v10 3/4] drm/i915/perf: prepare driver to receive multiple ctx handles Lionel Landwerlin
2020-04-30 14:55   ` Chris Wilson [this message]
2020-04-30 14:59     ` Lionel Landwerlin
2020-04-30 13:55 ` [Intel-gfx] [PATCH v10 4/4] drm/i915/perf: enable filtering on multiple contexts Lionel Landwerlin
2020-04-30 14:15 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/perf: Add support for multi context perf queries (rev4) Patchwork
2020-04-30 14:40 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-04-30 22:57 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=158825850531.7361.958274130340194506@build.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lionel.g.landwerlin@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.