Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Ben Widawsky <ben@bwidawsk.net>,
	Intel GFX <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 2/2] drm/i915: Unpin stolen pages
Date: Mon, 3 Jun 2013 09:36:48 +0100	[thread overview]
Message-ID: <20130603083648.GC17485@cantiga.alporthouse.com> (raw)
In-Reply-To: <CAKMK7uF4Svn73oKvj7KH7ahpz3VTs_RUHJV_FJDU3rfsqu6Waw@mail.gmail.com>

On Sat, Jun 01, 2013 at 03:13:04PM +0200, Daniel Vetter wrote:
> On Sat, Jun 1, 2013 at 1:34 PM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > On Sat, Jun 01, 2013 at 11:17:10AM +0200, Daniel Vetter wrote:
> >> On Sat, Jun 1, 2013 at 1:51 AM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> >> > That neatly explains the WARN. Not too happy about accumulating lots of
> >> > backing storage specific processing into free_object, but that can be
> >> > fixed up later (there is an obj->ops->release() pending).
> >>
> >> I'm more irked with the semantic overloading of object pinning. Might
> >> be cleaner to otherwise mark stolen obejcts as not shrinkable instead
> >> of pinning them for their entire lifetime. But we can bikeshed that
> >> later on ;-)
> >
> > Some merit to that argument, but it still feels correct to say that the
> > stolen pages are pinned for their lifetime. Given obj->ops->release(),
> > it does actually become simpler to not mess around with pin_count. So
> > later it is.
> 
> I was more unhappy that pin_count has different meanings, until I've
> noticed that we've fixed that up already with the introduction of
> ->pages_pin_count. Shouldn't stolen mem just hold a reference on that
> one? After all unbinding from the gtt is ok with stolen memory, but
> dropping the backing storage in the shrinker won't work. Not that we
> currently use stolen for anything else than permanently pinned bos.

As mentioned on irc, stolen does use the pages_pin_count for its
purposes. The purpose of this patch is purely to allow sanity checking
the pages_pin_count with a WARN_ON during free which seems sensible but
not strictly required.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

  reply	other threads:[~2013-06-03  8:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-31 18:28 [PATCH 1/4] drm/i915: Demote unknown param to DRM_DEBUG Ben Widawsky
2013-05-31 18:28 ` [PATCH 2/4] drm/i915: Unbind the fb Ben Widawsky
2013-05-31 18:45   ` [PATCH 2/4] [v2] " Ben Widawsky
2013-05-31 19:39     ` Chris Wilson
2013-05-31 20:08       ` Ben Widawsky
2013-05-31 18:28 ` [PATCH 3/4] drm/i915: unpin pages at unbind Ben Widawsky
2013-05-31 18:46   ` Chris Wilson
2013-05-31 21:46     ` [PATCH 1/2] drm/i915: Make stolen use pin pages Ben Widawsky
2013-05-31 21:44       ` Ben Widawsky
2013-05-31 21:46       ` [PATCH 2/2] drm/i915: Unpin stolen pages Ben Widawsky
2013-05-31 23:51         ` Chris Wilson
2013-06-01  9:17           ` Daniel Vetter
2013-06-01 11:34             ` Chris Wilson
2013-06-01 13:13               ` Daniel Vetter
2013-06-03  8:36                 ` Chris Wilson [this message]
2013-06-03  8:52                   ` Daniel Vetter
2013-06-03 22:54                     ` Ben Widawsky
2013-05-31 18:28 ` [PATCH 4/4] drm/i915: Rename the gtt_list to global_list Ben Widawsky
2013-05-31 18:40   ` Chris Wilson
2013-05-31 18:38 ` [PATCH 1/4] drm/i915: Demote unknown param to DRM_DEBUG 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=20130603083648.GC17485@cantiga.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=ben@bwidawsk.net \
    --cc=daniel@ffwll.ch \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox