From: "Thomas Hellström" <thomas@shipmail.org>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 0/9] [RFC] fair-lru eviction
Date: Wed, 19 May 2010 21:51:33 +0200 [thread overview]
Message-ID: <4BF44145.1020006@shipmail.org> (raw)
In-Reply-To: <1274217111-3882-1-git-send-email-daniel.vetter@ffwll.ch>
Daniel,
Daniel Vetter wrote:
> Hi all,
>
> This patch series implements the fair-lru eviction Chris Wilson already
> posted with a twist. It's essentially the same idea & algorithm.
> Differnences versus his patch:
> - Doesn't do any allocations while scanning.
> - Implemented in drm_mm.c
>
> In other words, this should also be usable by ttm. The idea is simple:
> Scan through the lru, marking objects as evictable until there is a
> large area of memory free/free-able. Then walk through all the scanned
> objects in reverse, checking which ones fall into this hole. Finally
> evicting them.
>
> Comments, ideas highly welcome.
>
> As per usual, I couldn't resist and had to clean up the code in drm_mm.c a
> little.
>
> Yours, Daniel
>
>
While the cleanup of drm_mm.c looks fine to me, I'm not sure the fair
eviction is easy to implement with TTM.
TTM releases the spinlock protecting the drm_mm manager in between
evictions to be able to wait (without holding locks) for bo idle. That
means that the lru list may have changed between the first eviction and
the next. In practice, drivers either don't allow simultaneous bo
validation or should disallow it if thrashing is likely to occur, so the
likelyhood of the lru list changing in between evictions should be small
but it needs to be taken into account.
Nevertheless, the drm_mm.c cleanup is
Acked-by: Thomas Hellstrom <thellstrom@vmwgfx.com>
I'll leave it to the Intel guys to comment on the fair eviction stuff.
/Thomas
> Daniel Vetter (9):
> list.h: add list_for_each_entry_safe_from_reverse
> drm: use list_for_each_entry in drm_mm.c
> drm: kill drm_mm_node->private
> drm: kill dead code in drm_mm.c
> drm: sane naming for drm_mm.c
> drm_mm: extract check_free_mm_node
> drm: implement helper functions for scanning lru list
> drm/i915: prepare for fair lru eviction
> drm/i915: implement fair lru eviction
>
> drivers/gpu/drm/drm_mm.c | 359 ++++++++++++++++++++++++-------------
> drivers/gpu/drm/i915/i915_gem.c | 122 ++++++++-----
> drivers/gpu/drm/ttm/ttm_bo.c | 6 -
> drivers/gpu/drm/ttm/ttm_bo_util.c | 2 -
> include/drm/drm_mm.h | 27 +++-
> include/linux/list.h | 15 ++
> 6 files changed, 347 insertions(+), 184 deletions(-)
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
next prev parent reply other threads:[~2010-05-19 19:51 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-18 21:11 [PATCH 0/9] [RFC] fair-lru eviction Daniel Vetter
2010-05-18 21:11 ` [PATCH 1/9] list.h: add list_for_each_entry_safe_from_reverse Daniel Vetter
2010-05-18 21:11 ` [PATCH 2/9] drm: use list_for_each_entry in drm_mm.c Daniel Vetter
2010-05-18 21:11 ` [PATCH 3/9] drm: kill drm_mm_node->private Daniel Vetter
2010-05-19 9:25 ` Jerome Glisse
2010-05-19 17:03 ` Daniel Vetter
2010-05-19 22:04 ` Jerome Glisse
2010-05-18 21:11 ` [PATCH 4/9] drm: kill dead code in drm_mm.c Daniel Vetter
2010-05-18 21:11 ` [PATCH 5/9] drm: sane naming for drm_mm.c Daniel Vetter
2010-05-18 21:11 ` [PATCH 6/9] drm_mm: extract check_free_mm_node Daniel Vetter
2010-05-18 21:11 ` [PATCH 7/9] drm: implement helper functions for scanning lru list Daniel Vetter
2010-05-18 21:11 ` [PATCH 8/9] drm/i915: prepare for fair lru eviction Daniel Vetter
2010-05-18 21:11 ` [PATCH 9/9] drm/i915: implement " Daniel Vetter
2010-05-19 3:05 ` [PATCH 0/9] [RFC] fair-lru eviction Eric Anholt
2010-05-19 8:06 ` Chris Wilson
2010-05-19 16:57 ` Daniel Vetter
2010-05-19 17:09 ` Chris Wilson
2010-05-19 19:51 ` Thomas Hellström [this message]
2010-05-19 20:13 ` Daniel Vetter
2010-05-19 21:08 ` Thomas Hellstrom
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=4BF44145.1020006@shipmail.org \
--to=thomas@shipmail.org \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--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.