Re: [PATCH v2] drm/i915: Mark all objects as having being written to following hibernation

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

 



On Wed, May 11, 2016 at 05:11:55PM +0300, Imre Deak wrote:
> On Wed, 2016-04-20 at 20:00 +0100, Chris Wilson wrote:
> > During hibernation, all objects will have had their page contents
> > written to disk and then restored upon resume. This means that every
> > page will be dirty and we need to treat all objects as being in the CPU
> > domain and require their contents to be flushed before use.
> > 
> > At present we only do so for those objects bound into the Global GTT,
> > however we need to mark all allocated objects as being unclean.
> > 
> > v2: Actually restrict the clflushing of object content to post-hibernate
> > as we always call restore_gtt_mappings because we cannot trust the BIOS
> > not to scribble over the GGTT (but we can be confident that they will
> > not touch system pages i.e. normal shmemfs objects).
> 
> Then it should be (also) done from the PM restore hook as that's the
> one called during resuming from hibernation. The thaw hook is called
> right after creating the hibernation image (before writing it to disk),
> so you'll have (not-dirty) cached data in that case too, but processes
> are freezed so nothing should use the corresponding objects.

Ah. Right, s/thaw/restore indeed.
 
> Perhaps the best would be to move the objects to the CPU domain already
> in the freeze hook (called right before creating the hibernation image)
> as that covers both the above restore and thaw cases and that would
> also make resume a bit faster.

Hmm. I think I have an idea that should make us both a bit happier...
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://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