[PATCH] drm/i915: After hibernation, discard the unbound list

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

 



On Sun, Feb 10, 2013 at 11:04:17AM -0800, Ben Widawsky wrote:
> I'm confused by how you're going about this. To reorder what you said,
> if an object is on the unbound list the GPU is done with it, and it may
> require clflushing if on a non-LLC system.

Right, the objects on the unbound list are explicitly not in the CPU
domain and so we believe we can skip the clflush next time we try and
use them on the GPU.
 
> Then a hibernate comes along. Almost certainly the PM subsystem would
> have to invalidate all the caches before moving the image to disk.

s/PM/we/ The PM subsystem just concerns itself with moving pages from
ram to disk and back.

> Assuming the above is true:
> First question, why do you want to i915_gem_object_put_pages(). This
> would seem to do a bunch of unnecessary stuff (primarily setting pages
> as dirty when they need not be).

Not unnecessary. Even after hibernation since we need to keep the VM
bookkeeping happy and working in our favour.

> and second, why do you set I915_GEM_DOMAIN_GTT when put_pages fails?
> Is that just a hack to get the clflush?

Right. So that our invariants about the unbound list hold.
 
> I think if you can convince me why we need to clflush after resume, I'd
> be happy.

Because moving pages around trashed the CPU caches and upset our domain
tracking. The clflush is then required to move the object back into the
domain we believe it to be. Otherwise we end up with the GPU reading
stale data and hanging.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


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