[Intel-gfx] [PATCH 02/26] drm/i915: Skip shrinking already freed pages

Chris Wilson chris at chris-wilson.co.uk
Tue Jun 18 16:22:18 UTC 2019


Quoting Mika Kuoppala (2019-06-18 17:06:36)
> Chris Wilson <chris at chris-wilson.co.uk> writes:
> > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
> > index c851c4029597..3a926a8755c6 100644
> > --- a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
> > +++ b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
> > @@ -241,6 +241,9 @@ i915_gem_shrink(struct drm_i915_private *i915,
> >                       if (!can_release_pages(obj))
> >                               continue;
> >  
> > +                     if (!kref_get_unless_zero(&obj->base.refcount))
> > +                             continue;
> > +
> 
> The comment above, in this function, seems a little bit
> stale on talking about struct mutex. Straighten it up.
> 
> Reviewed-by: Mika Kuoppala <mika.kuoppala at linux.intel.com>

There's a series with the goal of straightening that up. :-p
-Chris


More information about the Intel-gfx mailing list