From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm: Only evict the blocks required to create the requested hole Date: Mon, 7 Jan 2013 21:55:26 +0100 Message-ID: <20130107205526.GU5737@phenom.ffwll.local> References: <1355933143-2372-1-git-send-email-chris@chris-wilson.co.uk> <1355935866-3700-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 mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by gabe.freedesktop.org (Postfix) with ESMTP id AE127E5E0C for ; Mon, 7 Jan 2013 12:53:30 -0800 (PST) Received: by mail-we0-f182.google.com with SMTP id u54so10481010wey.41 for ; Mon, 07 Jan 2013 12:53:29 -0800 (PST) Content-Disposition: inline In-Reply-To: <1355935866-3700-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: Chris Wilson Cc: Daniel Vetter , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Wed, Dec 19, 2012 at 04:51:06PM +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. > > v2: Check the original hole not the adjusted as the coloring may confuse > us when later searching for the overlapping nodes. Also make sure that > we do apply the range restriction and color adjustment in the same > order for both scanning, searching and insertion. > > v3: Send the version that was actually tested. > > Signed-off-by: Chris Wilson > Cc: Daniel Vetter Picked up for -fixes with bugzilla link and Norberts tested-by added, thanks for the patch. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch