From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>,
"Daniel, Thomas" <thomas.daniel@intel.com>,
Daniel Vetter <daniel@ffwll.ch>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"akash goel (akash.goels@gmail.com)" <akash.goels@gmail.com>
Subject: Re: [PATCH] drm/i915: Don't pin LRC in GGTT when dumping in debugfs
Date: Tue, 25 Nov 2014 16:59:58 +0100 [thread overview]
Message-ID: <20141125155958.GP25711@phenom.ffwll.local> (raw)
In-Reply-To: <20141125144433.GI17410@nuc-i3427.alporthouse.com>
On Tue, Nov 25, 2014 at 02:44:33PM +0000, Chris Wilson wrote:
> On Tue, Nov 25, 2014 at 02:30:55PM +0000, Daniel, Thomas wrote:
> > > -----Original Message-----
> > > From: daniel.vetter@ffwll.ch [mailto:daniel.vetter@ffwll.ch] On Behalf Of
> > > Daniel Vetter
> > > Sent: Thursday, November 20, 2014 12:51 PM
> > > To: Chris Wilson; Daniel, Thomas; intel-gfx@lists.freedesktop.org; akash goel
> > > (akash.goels@gmail.com)
> > > Subject: Re: [Intel-gfx] [PATCH] drm/i915: Don't pin LRC in GGTT when
> > > dumping in debugfs
> > >
> > > On Thu, Nov 20, 2014 at 1:28 PM, Chris Wilson <chris@chris-wilson.co.uk>
> > > wrote:
> > > >> Can you identify any situation where the pages may go away?
> > > >
> > > > Anytime you trigger an allocation, the system may reap any objects
> > > > pages. It will even steal the dev->struct_mutex. To protect against
> > > > the shrinker you have to call pin_pages(). Here, there are no
> > > > allocations inside the loop and so you don't need to worry about the
> > > > shrinker stealing your pages.
> > >
> > > Hm actually I think better safe than sorry here. At least I have
> > > (again) completely forgotten about our dear shrinker ...
> > > -Daniel
> >
> > Does this discussion count as a review? What was the conclusion - do I need to make a version without pinning or is it better safe than sorry?
>
> To bring it full circle:
>
> >> LRC object does not need to be mapped into the GGTT when dumping. Just use
> >> pin_pages. A side-effect of this patch is that a compiler warning goes away
> >> (not checking return value of i915_gem_obj_ggtt_pin).
>
> > Please explain why you need to pin the pages.
>
> In particular, explain why just calling pin_pages() doesn't do what you
> want. And then afterwards you can leave a note in the commitlog why you
> use pin_pages() as overkill.
Ok I think I see the confusion - we still don't have any error checking,
because we don't call get_pages. pin_pages alone doesn't do a whole lot
really. We might actually want to put the get_pages into the pin_pages to
simplify the interface a bit. Well we need to keep the raw version as __
since some users really don't want a get_pages.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - 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:[~2014-11-25 15:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-20 11:12 [PATCH] drm/i915: Don't pin LRC in GGTT when dumping in debugfs Thomas Daniel
2014-11-20 11:16 ` Chris Wilson
2014-11-20 11:25 ` Daniel, Thomas
2014-11-20 11:39 ` Daniel Vetter
2014-11-20 11:41 ` Chris Wilson
2014-11-20 12:09 ` Daniel, Thomas
2014-11-20 12:28 ` Chris Wilson
2014-11-20 12:50 ` Daniel Vetter
2014-11-25 14:30 ` Daniel, Thomas
2014-11-25 14:44 ` Chris Wilson
2014-11-25 15:59 ` Daniel Vetter [this message]
2014-11-25 16:42 ` Daniel, Thomas
2014-11-25 20:51 ` Chris Wilson
2014-11-26 12:28 ` Daniel Vetter
2014-12-02 13:21 ` Thomas Daniel
2014-12-02 14:22 ` Daniel Vetter
2014-12-03 1:39 ` shuang.he
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=20141125155958.GP25711@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=akash.goels@gmail.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=thomas.daniel@intel.com \
/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