From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Daniel Vetter <daniel@ffwll.ch>,
Dave Gordon <david.s.gordon@intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v1] drm/i915/guc: Fix a fw content lost issue after it is evicted
Date: Wed, 25 Nov 2015 09:40:45 +0100 [thread overview]
Message-ID: <20151125084045.GJ17050@phenom.ffwll.local> (raw)
In-Reply-To: <20151124230125.GD16277@nuc-i3427.alporthouse.com>
On Tue, Nov 24, 2015 at 11:01:25PM +0000, Chris Wilson wrote:
> On Tue, Nov 24, 2015 at 07:06:21PM +0100, Daniel Vetter wrote:
> > Just setting obj->dirty only works if you also have the pages.
>
> Exactly. The CPU access has historically always been page-by-page. The
> style here more or less to emulate the CPU mmap.
>
> > But it's also not awesome that set_to_gtt_domain does this for callers.
>
> Hmm, do you have an example where we want set-to-gtt(write), but not
> actually write through the backing storage? Internal use of set-to-gtt
> has never been ideal (e.g. context) but we haven't yet come up with a
> better semantic.
Just the inconsistency that Dave pointed out is a bit worrisome. At most
we can fix this with docs (which atm we have), which gives us a rather low
score on API design (still a positive one still it's possible to get
right). I agree that I don't have better semantics either.
> > For lack of clear solutions I'd go with sprinkling obj->dirty or
> > page_set_dirty over callers. Aside: relocate_entry_cpu probably gets away
> > because of the unconditional obj->dirty we do later on, and that we redo
> > all relocs if a fault happens. Still would be good to fix it, just for
> > safety.
>
> [copy_batch() isn't a bug as the contents are invalidated after use
> anyway]
Just for consistency adding the obj->dirty after get_pages won't hurt
though.
> relocate_entry_cpu() is a bug we never caught. Indeed we've papered over
> it to mask some over userspace issues, but just adding the set_page_dirty()
> as required isn't going to be a big hardship.
Yeah.
> We have tons of swapthrash tests to check persistency of GPU buffers,
> but we never tried to thrash the batches themselves out to swap and then
> reuse them.
>
> I guess that it is because userspace doesn't reuse batches that we never
> had report of the issue. Hibernating would be a good exercise of such.
Hm it's not just batches but any object with relocs. Could this explain
the oddball libva/uxa hang? Stuff like "after playing $game for hours my
desktop looked funny", but not for tiling issues.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-11-25 8:40 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-06 21:55 [PATCH] drm/i915/guc: Fix a fw content lost issue after it is evicted yu.dai
2015-11-06 22:07 ` Chris Wilson
2015-11-06 23:18 ` Yu Dai
2015-11-09 10:15 ` Chris Wilson
2015-11-10 23:27 ` [PATCH v1] " yu.dai
2015-11-11 9:07 ` Chris Wilson
2015-11-11 19:01 ` Yu Dai
2015-11-23 9:18 ` akash goel
2015-11-23 9:37 ` Chris Wilson
2015-11-24 15:47 ` Dave Gordon
2015-11-24 16:04 ` Daniel Vetter
2015-11-24 17:47 ` Dave Gordon
2015-11-24 18:06 ` Daniel Vetter
2015-11-24 23:01 ` Chris Wilson
2015-11-25 8:40 ` Daniel Vetter [this message]
2015-11-25 9:02 ` Chris Wilson
2015-11-25 9:59 ` Daniel Vetter
2015-11-10 23:29 ` [PATCH] " Yu Dai
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=20151125084045.GJ17050@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=chris@chris-wilson.co.uk \
--cc=david.s.gordon@intel.com \
--cc=intel-gfx@lists.freedesktop.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