intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Eric Anholt <eric@anholt.net>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Protect mmaped buffers from casual eviction.
Date: Tue, 11 May 2010 23:57:06 +0100	[thread overview]
Message-ID: <89k304$ig3ed2@orsmga001.jf.intel.com> (raw)
In-Reply-To: <87fx1yqtpv.fsf@pollan.anholt.net>

On Tue, 11 May 2010 09:38:36 -0700, Eric Anholt <eric@anholt.net> wrote:
> Couldn't this be more easily handled by the times where you would move
> to the tail of mmap, just move to the tail of inactive?  Since inactive
> is "obj_priv->gtt_space && !obj_priv->active" already.

The real issue is the inactive list is no longer evicted in LRU, otherwise
just moving to the end of inactive list would be ideal. In benchmarks it
is faster to evict the appropriately sized object rather than iterate
over the inactive list until enough contiguous space has been freed. The
consequence is that the page-fault-of-doom is reintroduced unless some
measure is taken to avoid it. I don't have any figures to suggest what the
average size of the mmap_list will be. As an object is only on the list
until it is used or evict-everything, then the list should be kept quite
short. As our drivers improve, the frequency at which we have to mmap
buffers should reduce as well...
-ickle

-- 
Chris Wilson, Intel Open Source Technology Centre

      reply	other threads:[~2010-05-11 22:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-11 15:55 [PATCH] drm/i915: Protect mmaped buffers from casual eviction Chris Wilson
2010-05-11 16:38 ` Eric Anholt
2010-05-11 22:57   ` Chris Wilson [this message]

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='89k304$ig3ed2@orsmga001.jf.intel.com' \
    --to=chris@chris-wilson.co.uk \
    --cc=eric@anholt.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).