From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: [PATCH] drm/i915: VM eviction only targets address space not physical pages Date: Wed, 29 Jan 2014 12:06:36 -0800 Message-ID: <20140129200636.GA31282@intel.com> References: <1390932518-3893-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-pd0-f179.google.com (mail-pd0-f179.google.com [209.85.192.179]) by gabe.freedesktop.org (Postfix) with ESMTP id 8258C11E147 for ; Wed, 29 Jan 2014 12:06:40 -0800 (PST) Received: by mail-pd0-f179.google.com with SMTP id q10so2109206pdj.24 for ; Wed, 29 Jan 2014 12:06:40 -0800 (PST) Content-Disposition: inline In-Reply-To: <1390932518-3893-1-git-send-email-chris@chris-wilson.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Chris Wilson Cc: Daniel Vetter , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, Jan 28, 2014 at 06:08:38PM +0000, Chris Wilson wrote: > During eviction, we are only considering how to free up space within the > current address space and not concerned with freeing up physical memory. > As such we need only skip nodes that pinned in the current VM and not > globally. > > Signed-off-by: Chris Wilson > Cc: Daniel Vetter > Cc: Ben Widawsky Can you rename i915_gem_evict_something() or add a comment at the top that the function is not used by the shrinker, and is for evicting a VM? The comment we currently have in the function doesn't suggest this at all. Reviewed-by: Ben Widawsky > --- > drivers/gpu/drm/i915/i915_gem_evict.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c > index 525b242ac512..a745966b7e16 100644 > --- a/drivers/gpu/drm/i915/i915_gem_evict.c > +++ b/drivers/gpu/drm/i915/i915_gem_evict.c > @@ -36,8 +36,7 @@ > static bool > mark_free(struct i915_vma *vma, struct list_head *unwind) > { > - /* Freeing up memory requires no VMAs are pinned */ > - if (i915_gem_obj_is_pinned(vma->obj)) > + if (vma->pin_count) > return false; > > if (WARN_ON(!list_empty(&vma->exec_list))) > -- > 1.8.5.3 > -- Ben Widawsky, Intel Open Source Technology Center