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