From 586052b0a6062e2fa98189d7f24d8cb9ccf4258b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Mon, 2 Nov 2020 13:01:53 +0100 Subject: drm/ttm: rework no_retry handling v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit During eviction we do want to trigger the OOM killer. Only while doing new allocations we should try to avoid that and return -ENOMEM to the application. v2: rename the flag to gfp_retry_mayfail. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/398685/ --- drivers/gpu/drm/ttm/ttm_tt.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'drivers/gpu/drm/ttm/ttm_tt.c') diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c index 8861a74ac335..cfd633c7e764 100644 --- a/drivers/gpu/drm/ttm/ttm_tt.c +++ b/drivers/gpu/drm/ttm/ttm_tt.c @@ -51,9 +51,6 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc) if (bo->ttm) return 0; - if (bdev->no_retry) - page_flags |= TTM_PAGE_FLAG_NO_RETRY; - switch (bo->type) { case ttm_bo_type_device: if (zero_alloc) @@ -211,8 +208,6 @@ int ttm_tt_swapin(struct ttm_tt *ttm) swap_space = swap_storage->f_mapping; gfp_mask = mapping_gfp_mask(swap_space); - if (ttm->page_flags & TTM_PAGE_FLAG_NO_RETRY) - gfp_mask |= __GFP_RETRY_MAYFAIL; for (i = 0; i < ttm->num_pages; ++i) { from_page = shmem_read_mapping_page_gfp(swap_space, i, @@ -260,8 +255,6 @@ int ttm_tt_swapout(struct ttm_bo_device *bdev, struct ttm_tt *ttm) swap_space = swap_storage->f_mapping; gfp_mask = mapping_gfp_mask(swap_space); - if (ttm->page_flags & TTM_PAGE_FLAG_NO_RETRY) - gfp_mask |= __GFP_RETRY_MAYFAIL; for (i = 0; i < ttm->num_pages; ++i) { from_page = ttm->pages[i]; -- cgit v1.2.3