From: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Matthew Auld <matthew.auld@intel.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Jani Nikula <jani.nikula@intel.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] drm/i915/oa: Disable OA on Haswell
Date: Fri, 11 May 2018 16:58:27 +0100 [thread overview]
Message-ID: <31a65c2f-0660-66c3-06d5-5c9d5b14bf62@intel.com> (raw)
In-Reply-To: <152605386089.14639.3256384478973355617@mail.alporthouse.com>
On 11/05/18 16:51, Chris Wilson wrote:
> Quoting Lionel Landwerlin (2018-05-11 16:43:02)
>> On 11/05/18 15:18, Chris Wilson wrote:
>>> Quoting Lionel Landwerlin (2018-05-11 15:14:13)
>>>> My understanding of the virtual memory addressing from the GPU is limited...
>>>> But how can the GPU poke at the kernel's allocated data?
>>>> I thought we mapped into the GPU's address space only what is allocated
>>>> through gem.
>>> Correct. The HW should only be accessing the pages through the GTT and
>>> the GTT should only contain known pages (or a pointer to the scratch
>>> page). There is maybe a hole where we are freeing the memory before
>>> the HW has finished using it (still writing through stale TLB and
>>> whatnot even though the system has reallocated the pages), but other
>>> than that quite, quite scary. Hence this awooga.
>>> -Chris
>>>
>> I managed to reproduce a kasan backtrace on the same test.
>> So it's not just the CI machine.
>>
>> But I can't even startup a gdm on that machine with drm-tip. So maybe
>> there is some much more broken...
> Don't leave us in suspense...
Your first patch (check that OA is actually disabled) seems to get rid
of the issue on my machine.
Thanks a lot a for finding that!
Trying to find when HSW when wrong now. Same kernel works just fine on
my SKL.
>
>> i915/perf unpins the object correctly before freeing (at which point it
>> could be reused).
> Sure, but does perf know that the OA unit has stopped writing at that
> point... That's not so clear (from my pov).
Clearly it wasn't :(
>
>> Should we ensure i915_vma_destroy() i915/perf maybe?
>>
>> It almost seems like this is an issue that could arise in other part of
>> the driver too.
> The problem of the HW continuing to access the pages after unbinding is
> inherent to the system (and what actually happens if we change PTE in
> flight is usually undefined), hence the great care we go to track HW
> activity and try not to release pages while it is still using them.
> -Chris
>
next prev parent reply other threads:[~2018-05-11 15:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-11 13:56 [PATCH] drm/i915/oa: Disable OA on Haswell Chris Wilson
2018-05-11 14:14 ` Lionel Landwerlin
2018-05-11 14:18 ` Chris Wilson
2018-05-11 14:28 ` Lionel Landwerlin
2018-05-11 14:34 ` Chris Wilson
2018-05-11 14:37 ` Lionel Landwerlin
2018-05-11 15:43 ` Lionel Landwerlin
2018-05-11 15:51 ` Chris Wilson
2018-05-11 15:58 ` Lionel Landwerlin [this message]
2018-05-11 16:07 ` Chris Wilson
[not found] ` <b247a2ad-16e1-dfb3-b784-7dd74f2aeb43@intel.com>
2018-05-11 18:14 ` Chris Wilson
2018-05-14 7:44 ` Chris Wilson
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=31a65c2f-0660-66c3-06d5-5c9d5b14bf62@intel.com \
--to=lionel.g.landwerlin@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=matthew.auld@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=stable@vger.kernel.org \
/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