From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: Use new dma-map IOVA alloc, link, and sync API in GPU SVM and DRM pagemap Date: Sun, 12 Apr 2026 12:09:34 +1000 Message-ID: In-Reply-To: <20260408201537.3580549-1-matthew.brost@intel.com> References: <20260408201537.3580549-1-matthew.brost@intel.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Overall Series Review Subject: Use new dma-map IOVA alloc, link, and sync API in GPU SVM and DRM pagemap Author: Matthew Brost Patches: 8 Reviewed: 2026-04-12T12:09:34.814166 --- This v6 series converts DRM GPU SVM and DRM pagemap migration paths to use the newer `dma_iova_try_alloc` / `dma_iova_link` / `dma_iova_sync` API instead of individual `dma_map_page` / `dma_unmap_page` calls, avoiding costly per-page IOMMU synchronizations. The claimed performance improvement is significant (~33% reduction in 2M migration CPU time). The series is well-structured: patch 1 handles GPU SVM independently, patches 2-3 prepare the pagemap code (removing a dead flag, splitting a function), patch 4 adds IOVA support to pagemap, and patch 5 is a trivial doc fix. The progression is logical and each patch is reviewable on its own. The fallback pattern using `dma_iova_try_alloc` (try, check `dma_use_iova()`, fall back to `dma_map_page`) follows the same idiom used by block layer and RDMA callers. Error paths and cleanup look correct throughout. **Key concerns:** - The `phys` parameter passed to `dma_iova_try_alloc` is misleading/useless (see patches 1 and 4). - A stale `@dma_addr` reference in kerneldoc is introduced in patch 3 and not fixed by patch 5. - IOVA is over-allocated when NULL pages exist in the pfn array (minor waste, not a bug). Overall this looks ready with minor nits. No correctness issues found. --- --- Generated by Claude Code Patch Reviewer