[Intel-gfx] [PATCH] drm/i915: Suppress switch_mm emission between the same aliasing_ppgtt
chris at chris-wilson.co.uk
Wed Jan 11 15:43:41 UTC 2017
On Wed, Jan 11, 2017 at 05:35:08PM +0200, Martin Peres wrote:
> On 11/01/17 14:58, Joonas Lahtinen wrote:
> >On ke, 2017-01-11 at 12:14 +0000, Chris Wilson wrote:
> >>When switching between contexts using the aliasing_ppgtt, the VM is
> >>shared. We don't need to reload the PD registers unless they are dirty.
> >>Martin Peres reported an issue that looks like corruption between
> >>Haswell context switches, bisecting to commit f9326be5f1d3 ("drm/i915:
> >>Rearrange switch_context to load the aliasing ppgtt on first use").
> >>Switching between the same mm (the aliasing_ppgtt is used for all
> >>contexts in this case) should be a nop, but appears to trigger some
> >>side-effects in the context switch. However, as we know the switch
> >>is redundant in this case, we can skip it and continue to ignore the
> >>issue until somebody feels strong enough to investigate full-ppgtt on
> >>gen7 again!
> >>Fixes: f9326be5f1d3 ("drm/i915: Rearrange switch_context to load the aliasing ppgtt on first use")
> >>Reported-by: Martin Peres <martin.peres at linux.intel.com>
> >>Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> >>Cc: Martin Peres <martin.peres at linux.intel.com>
> >Code looks good, could use the T-b's to verify.
> >Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> >Regards, Joonas
> was actually the commit that massively improved the corruption I was
> seeing in one benchmark while this patch had no visible impact.
> However, my problem was that i915.enable_ppgtt=2 was set in
> /etc/modprobe.d/... and I had completely forgotten about it.
> So yeah, now you know that f9326be5f1d3 massively broke
> enable_ppgtt=2, but not sure what you want to do about it.
> There is no hurry though, as the defaults are sane.
> Sorry for the noise everyone, I hope that my painful manual bisects
> will be useful if someone wants to make the second mode work :)
The information is very useful, I've added that the symptoms have only
been seen with full-ppgtt. I don't see any reason to apply this patch now,
so will send it along with the series playing with i915_gem_gtt.c once
the kselftests for it are in.
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx