From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Hellstrom Subject: Re: [PATCH 4/6] drm/ttm: cope with reserved buffers on swap list in ttm_bo_swapout, v2 Date: Wed, 28 Nov 2012 15:27:18 +0100 Message-ID: <50B61F46.7060707@vmware.com> References: <1354101944-10455-1-git-send-email-maarten.lankhorst@canonical.com> <1354101944-10455-4-git-send-email-maarten.lankhorst@canonical.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from smtp-outbound-1.vmware.com (smtp-outbound-1.vmware.com [208.91.2.12]) by gabe.freedesktop.org (Postfix) with ESMTP id A68D4E5EB1 for ; Wed, 28 Nov 2012 06:27:23 -0800 (PST) In-Reply-To: <1354101944-10455-4-git-send-email-maarten.lankhorst@canonical.com> 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: Maarten Lankhorst Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On 11/28/2012 12:25 PM, Maarten Lankhorst wrote: > Replace the while loop with a simple for each loop, and only run the > delayed destroy cleanup if we can reserve the buffer first. > > No race occurs, since lru lock is never dropped any more. An empty list > and a list full of unreservable buffers both cause -EBUSY to be returned, > which is identical to the previous situation. > > Signed-off-by: Maarten Lankhorst > --- > drivers/gpu/drm/ttm/ttm_bo.c | 44 ++++++++++++++------------------------------ > 1 file changed, 14 insertions(+), 30 deletions(-) > For patch 4-6 Reviewed-by: Thomas Hellstrom