Re: [PATCH] Revert "drm/i915: Allocate context objects from stolen"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 30, 2015 at 12:07:06PM +0530, Akash Goel wrote:
> On Mon, 2015-06-29 at 21:05 +0100, Chris Wilson wrote:
> > On Mon, Jun 29, 2015 at 08:53:12PM +0100, Chris Wilson wrote:
> > > On Mon, Jun 29, 2015 at 08:28:35PM +0300, ville.syrjala@xxxxxxxxxxxxxxx wrote:
> > > > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > > > 
> > > > Stolen gets trashed during hibernation, so storing contexts there
> > > > is not a very good idea. On my IVB machines this leads to a totally
> > > > dead GPU on resume. A reboot is required to resurrect it. So let's
> > > > not store contexts where they will get trampled.
> > > 
> > > We need to disable use of stolen entirely then. Fortunately ring buffers
> > > are idle (and so trashable), but all plans for actually using stolen are
> > > off the cards then (e.g. the create2 request to allocate from stolen).
> > > 
> > > I think it is fairer to say that stolen memory is not restored, and to
> > > do so for hibernation of non-volatile objects would require allocation
> > > of ordinary buffers. Ack on the patch in the short term, does a long
> > > term plan of migrating I915_MADV_WILLNEED stolen objects to normal
> > > memory on hibernation sound acceptable? (I don't like how it makes
> > > hibernation special in terms of shutdown/suspend, but meh)
> > 
> > I can get a patch to do the migration ready tomorrow, though it will
> > certainly be quite a few interesting patches.
> > 
> Hi Chris,
> 
> Thanks for keeping us in the loop. 
> As you are aware, that we started working on the patches for utilizing
> the Stolen area, based on the placement preference flag passed by the
> User (extended gem_create ioctl for it). We are trying to get them
> reviewed. Would this use case of hibernation thwart that efforts ?

Yes. Since if we are not careful we can effectively loose the user data
across hibernation. So long as we can allocate fresh storage for those
objects during hibernation (and we can use the madv flags to limit what
we need to copy) then creating stolen objects for general use is fine.
I'll leave the debate as to whether we want to migrate such objects back
to stolen on thaw/first-use for later. (Gut feeling hibernate + stolen
will be so rare that the justification for migrating back will be
small.)
 
> Are you planning to add the support for taking the back up of the
> objects allocated from Stolen memory area, by copying them to shmem at
> the time of hibernation. Should the objects be copied back to Stolen
> area on resume ? 

Yes. Maybe.

> Is this something, which we can implement and add a new patch to the
> series ? 

It's something I need now as an alternative to reverting
context-in-stolen.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux