[Intel-gfx] [PATCH] drm/i915: Remove toplevel struct_mutex locking from debugfs/i915_drop_caches
Chris Wilson
chris at chris-wilson.co.uk
Thu May 25 15:03:14 UTC 2017
On Thu, May 25, 2017 at 05:58:33PM +0300, Joonas Lahtinen wrote:
> On ke, 2017-05-24 at 17:26 +0100, Chris Wilson wrote:
> > I have a plan to write a quick test to exercise concurrent usage of
> > i915_gem_shrink(), the simplest way looks to be to have multiple threads
> > using debugfs/i915_drop_caches. However, we currently take one lock over
> > the entire function, serialising the calls into i915_gem_shrink() so
> > reduce the lock coverage.
> >
> > Testcase: igt/gem_shrink/reclaim
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
>
> <SNIP>
>
> > + if (val & DROP_RETIRE)
> > + i915_gem_retire_requests(dev_priv);
> > +
> > + mutex_unlock(&dev->struct_mutex);
> > + }
> >
> > lockdep_set_current_reclaim_state(GFP_KERNEL);
>
> Lock used to work as a serializer, isn't this going to get contended
> now?
lockdep_set_current ?
The intention is to allow the contention to reach i915_gem_shrink where
we have the more complex locking.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list