From: Daniel Vetter Subject: [PATCH 0/9] [RFC] fair-lru eviction Date: Tue, 18 May 2010 23:11:42 +0200 Message-ID: <1274217111-3882-1-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org Cc: Daniel Vetter , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org 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 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(-)