From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH] drm: Only evict the blocks required to create the requested hole Date: Tue, 18 Dec 2012 10:37:06 +0000 Message-ID: References: <1355680301-25749-1-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 70572E5EA5 for ; Tue, 18 Dec 2012 02:37:21 -0800 (PST) In-Reply-To: <1355680301-25749-1-git-send-email-chris@chris-wilson.co.uk> 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: dri-devel@lists.freedesktop.org Cc: Daniel Vetter List-Id: dri-devel@lists.freedesktop.org On Sun, 16 Dec 2012 17:51:41 +0000, Chris Wilson wrote: > Avoid clobbering adjacent blocks if they happen to expire earlier and > amalgamate together to form the requested hole. > > In passing this fixes a regression from > commit ea7b1dd44867e9cd6bac67e7c9fc3f128b5b255c > Author: Daniel Vetter > Date: Fri Feb 18 17:59:12 2011 +0100 > > drm: mm: track free areas implicitly > > which swaps the end address for size (with a potential overflow) and > effectively causes the eviction code to clobber almost all earlier > buffers above the evictee. > > Signed-off-by: Chris Wilson > Cc: Daniel Vetter On IRC I mentioned that I feared there be dragon lurking here. They turned out to be figments of my own code - a later patch to adjust the allocation of nodes was incomplete. Please review and consider this patch. -Chris -- Chris Wilson, Intel Open Source Technology Centre