Re: [PATCH 2/2] drm/ttm: completely rework ttm_bo_delayed_delete

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

 



On 15/11/17 01:31 PM, Christian König wrote:
> There is no guarantee that the next entry on the ddelete list stays on
> the list when we drop the locks.
> 
> Completely rework this mess by moving processed entries on a temporary
> list.
> 
> Signed-off-by: Christian König <christian.koenig@xxxxxxx>

[...]

>  static void ttm_bo_delayed_workqueue(struct work_struct *work)
>  {
>  	struct ttm_bo_device *bdev =
>  	    container_of(work, struct ttm_bo_device, wq.work);
> +	unsigned long delay = ((HZ / 100) < 1) ? 1 : HZ / 100;
>  
> -	if (ttm_bo_delayed_delete(bdev, false)) {
> -		schedule_delayed_work(&bdev->wq,
> -				      ((HZ / 100) < 1) ? 1 : HZ / 100);
> -	}
> +	if (!ttm_bo_delayed_delete(bdev, false))
> +		schedule_delayed_work(&bdev->wq, delay);
>  }

Would be better to only add the ! here and leave the rest of this
function unchanged in this patch. The cleanup can be done in a separate
patch.

Other than that, both patches are

Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@xxxxxxx>


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
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