Re: [PATCH 13/14] drm/msm: Drop struct_mutex in shrinker path

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

 



On Sun,  4 Oct 2020 12:21:45
> From: Rob Clark <robdclark@xxxxxxxxxxxx>
> 
> Now that the inactive_list is protected by mm_lock, and everything
> else on per-obj basis is protected by obj->lock, we no longer depend
> on struct_mutex.
> 
> Signed-off-by: Rob Clark <robdclark@xxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/msm/msm_gem.c          |  1 -
>  drivers/gpu/drm/msm/msm_gem_shrinker.c | 54 --------------------------
>  2 files changed, 55 deletions(-)
> 
[...]

> @@ -71,13 +33,8 @@ msm_gem_shrinker_scan(struct shrinker *shrinker, struct shrink_control *sc)
>  {
>  	struct msm_drm_private *priv =
>  		container_of(shrinker, struct msm_drm_private, shrinker);
> -	struct drm_device *dev = priv->dev;
>  	struct msm_gem_object *msm_obj;
>  	unsigned long freed = 0;
> -	bool unlock;
> -
> -	if (!msm_gem_shrinker_lock(dev, &unlock))
> -		return SHRINK_STOP;
>  
>  	mutex_lock(&priv->mm_lock);

Better if the change in behavior is documented that SHRINK_STOP will
no longer be needed.

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux