All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/i915/oa: Reconfigure contexts on the fly
Date: Thu, 11 Jul 2019 16:05:12 +0100	[thread overview]
Message-ID: <156285751207.12757.12563510033791554154@skylake-alporthouse-com> (raw)
In-Reply-To: <156259317575.9375.9765045306016542839@skylake-alporthouse-com>

Quoting Chris Wilson (2019-07-08 14:39:35)
> Quoting Tvrtko Ursulin (2019-07-08 13:24:39)
> > 
> > On 08/07/2019 13:16, Chris Wilson wrote:
> > > Quoting Tvrtko Ursulin (2019-07-08 13:10:34)
> > >>
> > >> On 08/07/2019 12:19, Chris Wilson wrote:
> > >>> Avoid a global idle barrier by reconfiguring each context by rewriting
> > >>> them with MI_STORE_DWORD from the kernel context.
> > >>>
> > >>> v2: We only need to determine the desired register values once, they are
> > >>> the same for all contexts.
> > >>>
> > >>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > >>> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> > >>> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > >>> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> > >>> ---
> > >>>    drivers/gpu/drm/i915/gem/i915_gem_context.c |   2 +
> > >>>    drivers/gpu/drm/i915/gt/intel_lrc.c         |   7 +-
> > >>>    drivers/gpu/drm/i915/i915_perf.c            | 248 +++++++++++++++-----
> > >>>    3 files changed, 195 insertions(+), 62 deletions(-)
> > >>>
> > >>> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c
> > >>> index e367dce2a696..1f0d10bb88c1 100644
> > >>> --- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
> > >>> +++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
> > >>> @@ -624,7 +624,9 @@ i915_gem_context_create_kernel(struct drm_i915_private *i915, int prio)
> > >>>        ctx->sched.priority = I915_USER_PRIORITY(prio);
> > >>>        ctx->ring_size = PAGE_SIZE;
> > >>>    
> > >>> +     /* Isolate the kernel context from prying eyes and sticky fingers */
> > >>>        GEM_BUG_ON(!i915_gem_context_is_kernel(ctx));
> > >>> +     list_del_init(&ctx->link);
> > >>
> > >> Why exactly?
> > > 
> > > Otherwise we recursively try to modify the context.
> > 
> >  From gen8_configure_all_contexts, twice, or really recursively? If 
> > former isn't that solvable by simply skipping kernel contexts in the 
> > first loop?
> > 
> > >> Any repercussions for i915_sysfs/i915_l3_write? debugfs I gather you
> > >> won't care about?
> > > 
> > > No, because what matters for those is user contexts.
> > 
> > There isn't some time cost associated with l3_remap calls when switching 
> > contexts?
> 
> No, it's even weirder than that as it is not a context register (at
> least on hsw where we support it). I guess, we should just unlazy and emit
> a request from the sysfs.

Actually, I am wrong here. The L3 remapping registers do appear to be
saved in the context image. At least that is what my testing indicates.

I can still argue that they don't apply to the kernel context. But my
plan to remove the walk over GEM contexts and the lazy update fails.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-07-11 15:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-08 11:19 [PATCH 1/2] drm/i915/oa: Reconfigure contexts on the fly Chris Wilson
2019-07-08 11:19 ` [PATCH 2/2] drm/i915: Add to timeline requires the timeline mutex Chris Wilson
2019-07-08 11:22   ` [PATCH v2] " Chris Wilson
2019-07-08 11:39   ` [PATCH v3] " Chris Wilson
2019-07-08 12:18     ` Tvrtko Ursulin
2019-07-08 12:22       ` Chris Wilson
2019-07-08 13:32         ` Chris Wilson
2019-07-08 13:40           ` Tvrtko Ursulin
2019-07-08 13:47             ` Chris Wilson
2019-07-08 13:49               ` Chris Wilson
2019-07-08 11:52 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/oa: Reconfigure contexts on the fly (rev2) Patchwork
2019-07-08 12:10 ` [PATCH 1/2] drm/i915/oa: Reconfigure contexts on the fly Tvrtko Ursulin
2019-07-08 12:16   ` Chris Wilson
2019-07-08 12:24     ` Tvrtko Ursulin
2019-07-08 13:39       ` Chris Wilson
2019-07-11  7:23         ` Tvrtko Ursulin
2019-07-11  7:59           ` Chris Wilson
2019-07-11 15:05         ` Chris Wilson [this message]
2019-07-08 12:35 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/oa: Reconfigure contexts on the fly (rev3) Patchwork
2019-07-08 17:37 ` ✓ Fi.CI.IGT: " Patchwork
2019-07-11 15:12 ` [PATCH v3] drm/i915/oa: Reconfigure contexts on the fly Chris Wilson
2019-07-11 17:59 ` ✓ Fi.CI.BAT: success for series starting with [v3] drm/i915/oa: Reconfigure contexts on the fly (rev4) Patchwork
2019-07-12 19:39 ` ✓ 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=156285751207.12757.12563510033791554154@skylake-alporthouse-com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tvrtko.ursulin@linux.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.