Re: [PATCH 2/2] drm/i915: Removing polling for struct_mutex from vmap shrinker

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

 



Quoting Tvrtko Ursulin (2019-01-10 13:16:30)
> 
> On 10/01/2019 10:39, Chris Wilson wrote:
> > Quoting Tvrtko Ursulin (2019-01-10 10:28:14)
> >>
> >> On 09/01/2019 16:42, Chris Wilson wrote:
> >>> The wait-for-idle used from within the shrinker_lock_uninterruptible
> >>> depends on the struct_mutex locking state being known and declared to
> >>> i915_request_wait(). As it is conceivable that we reach the vmap
> >>> notifier from underneath struct_mutex (and so keep on relying on the
> >>> mutex_trylock_recursive), we should not blindly call i915_request_wait.
> >>>
> >>> In the process we can remove the dubious polling to acquire
> >>> struct_mutex, and simply act, or not, on a successful trylock.
> >>
> >> Makes sense and removes the special casing. I only miss the historical
> >> reference as to why did vmap notifier need this special handling?
> > 
> > Cargo culting. I copied the code I had for oom-notifier, thinking the
> > heavier the hammer the better.
> 
> Go for it.
> 
> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>

Definitely a long way from perfection! Hopefully not one filled with
later regret.

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




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

  Powered by Linux