Re: [PATCH 031/262] drm/i915: Report all objects with allocated pages to the shrinker

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Matthew Auld (2018-05-18 17:42:27)
> On 17 May 2018 at 07:03, Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> wrote:
> >  static int
> >  i915_gem_wait_for_error(struct i915_gpu_error *error)
> >  {
> > @@ -2422,6 +2403,8 @@ __i915_gem_object_unset_pages(struct drm_i915_gem_object *obj)
> >
> >         spin_lock(&i915->mm.obj_lock);
> >         list_del(&obj->mm.link);
> > +       i915->mm.object_count--;
> > +       i915->mm.object_memory -= obj->base.size;
> >         spin_unlock(&i915->mm.obj_lock);
> >
> >         if (obj->mm.mapping) {
> > @@ -2708,6 +2691,8 @@ void __i915_gem_object_set_pages(struct drm_i915_gem_object *obj,
> >         GEM_BUG_ON(!HAS_PAGE_SIZES(i915, obj->mm.page_sizes.sg));
> >
> >         spin_lock(&i915->mm.obj_lock);
> > +       i915->mm.object_count++;
> > +       i915->mm.object_memory += obj->base.size;
> 
> Is it not worthwhile keeping the i915_gem_object_is_shrinkable() check?

If we rebrand these as i915->mm.shrink_count and shrink_memory, makes
sense.
-Chris

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux