From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Daniel Vetter <daniel@ffwll.ch>,
intel-gfx@lists.freedesktop.org,
Imre Deak <imre.deak@linux.intel.com>,
Akash Goel <akash.goel@intel.com>
Subject: Re: [PATCH] drm/i915: Migrate stolen objects before hibernation
Date: Wed, 1 Jul 2015 14:47:15 +0200 [thread overview]
Message-ID: <20150701124715.GD23343@phenom.ffwll.local> (raw)
In-Reply-To: <20150630124706.GQ1381@nuc-i3427.alporthouse.com>
On Tue, Jun 30, 2015 at 01:47:06PM +0100, Chris Wilson wrote:
> On Tue, Jun 30, 2015 at 02:07:41PM +0200, Daniel Vetter wrote:
> > On Tue, Jun 30, 2015 at 12:25:54PM +0100, Chris Wilson wrote:
> > > On Tue, Jun 30, 2015 at 12:54:02PM +0200, Daniel Vetter wrote:
> > > > The gpu should be able so pinned for scanout is the only corner case I can
> > > > think of atm.
> > >
> > > Hmm. That's a nuisance. But... We can throw away all the VM bindings
> > > that are unpinned, and then rewrite those that are left with the shmemfs
> > > pages.
> > >
> > > It's ugly. On migration back we would have to do a similar trick, and we
> > > need to tell a few white lies to get past some of our internal BUG_ON.
> > > However, as the contents are the same and the PTE writes are atomic into
> > > the GGTT, it should be invisible to the user.
> > >
> > > For internally allocated frontbuffers, I was expecting to mark them as
> > > volatile and let them lose their contents across hibernation - because
> > > they will be immediately cleared afterwards (at least so I expect).
> >
> > New upcoming complications: On some still super-secret upcoming platform
> > we need special ggtt vmas for scanout, to pin the backing storage into
> > suitable memory. And because the hw implementation does replace the ggtt
> > pte with the physical page entry (i.e. resolving dmar and stuff) it
> > disallows any writes to the ptes. So we can't replace the ggtt ptes while
> > the vma is pinned at all.
>
> In that scheme, our backing storage is incoherent with the actual
> contents. So we don't need the backing storage at all after setting the
> PTE and the entire object is volatile (so not saved across hibernate
> anyway). We wouldn't want to reserve stolen space for that, just a
> custom allocator and discard the pages asap. (Or we have a phys object
> scheme that does a lot of copying...)
The backing storage will still be coherent, it's just that the specific
view used to scan it out can't be touched at all (i.e. not even ptes
rewritten) while in use. Which means you can't rewrite pts, that's all.
We can still copy the actual backing storage using a new ggtt view
(they'll have different types) and convert to shmem. It's only that
rewriting the ptes for the scanout view can only happen on resume from
hibernate (we need to restore it all ofc again). Youre description above
sounded like you wanted to rewrite all ptes right away which I think isn't
need and at least with that fancy platform not possible - if we have
concurrent writes while we do the conversion there's a bug anyway.
-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-07-01 12:44 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-29 17:28 [PATCH] Revert "drm/i915: Allocate context objects from stolen" ville.syrjala
2015-06-29 19:53 ` Chris Wilson
2015-06-29 20:05 ` Chris Wilson
2015-06-30 6:37 ` Akash Goel
2015-06-30 8:31 ` Chris Wilson
2015-06-30 9:58 ` [PATCH] drm/i915: Migrate stolen objects before hibernation Chris Wilson
2015-06-30 10:11 ` Chris Wilson
2015-06-30 10:31 ` Chris Wilson
2015-06-30 10:54 ` Daniel Vetter
2015-06-30 11:03 ` Chris Wilson
2015-06-30 11:22 ` Daniel Vetter
2015-06-30 11:32 ` Chris Wilson
2015-06-30 11:54 ` Daniel Vetter
2015-06-30 12:37 ` Chris Wilson
2015-06-30 11:16 ` Chris Wilson
2015-06-30 12:00 ` Daniel Vetter
2015-06-30 11:20 ` Chris Wilson
2015-06-30 12:03 ` Daniel Vetter
2015-06-30 11:25 ` Chris Wilson
2015-06-30 12:07 ` Daniel Vetter
2015-06-30 12:47 ` Chris Wilson
2015-07-01 12:47 ` Daniel Vetter [this message]
2015-07-01 12:59 ` Chris Wilson
2015-07-01 13:49 ` Daniel Vetter
2015-06-30 8:31 ` [PATCH] Revert "drm/i915: Allocate context objects from stolen" Jani Nikula
2015-06-30 9:44 ` Chris Wilson
2015-06-30 10:07 ` Ville Syrjälä
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=20150701124715.GD23343@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=akash.goel@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=imre.deak@linux.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