All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Ben Widawsky <ben@bwidawsk.net>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: After hibernation, discard the unbound list
Date: Sun, 10 Feb 2013 19:19:14 +0000	[thread overview]
Message-ID: <20130210191914.GB8789@cantiga.alporthouse.com> (raw)
In-Reply-To: <20130210190416.GA1809@lundgren.amr.corp.intel.com>

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

  reply	other threads:[~2013-02-10 19:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-07 10:27 [PATCH] drm/i915: After hibernation, discard the unbound list Chris Wilson
2013-02-10 19:04 ` Ben Widawsky
2013-02-10 19:19   ` Chris Wilson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-02-07  9:37 Chris Wilson

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=20130210191914.GB8789@cantiga.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=ben@bwidawsk.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.