[PATCH] mm: Skip opportunistic reclaim for dma mapped pages

Chris Wilson chris at chris-wilson.co.uk
Wed Jun 24 17:59:38 UTC 2020


Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 mm/rmap.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/mm/rmap.c b/mm/rmap.c
index 5fe2dedce1fc..df968fe19c3c 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1393,6 +1393,10 @@ static bool try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
 	    is_zone_device_page(page) && !is_device_private_page(page))
 		return true;
 
+	/* Try and fail earlier to revoke a costly dma pinned page */
+	if (page_maybe_dma_pinned(page))
+		return true;
+
 	if (flags & TTU_SPLIT_HUGE_PMD) {
 		split_huge_pmd_address(vma, address,
 				flags & TTU_SPLIT_FREEZE, page);
-- 
2.20.1



More information about the Intel-gfx-trybot mailing list