✗ CI.checkpatch: warning for Fix device page migration in low memory fallback (rev2)
Patchwork <[email protected]> Wed, 05 Aug 2026 19:42:14 -0000
| Newsgroups | org.freedesktop.lists.intel-xe |
|---|---|
| Message-ID | <178595893407.23013.17424530168406373718@61270ab9df2a> |
== Series Details == Series: Fix device page migration in low memory fallback (rev2) URL : https://patchwork.freedesktop.org/series/171651/ State : warning == Summary == + KERNEL=/kernel + git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt Cloning into 'mt'... warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/ + git -C mt rev-list -n1 origin/master 061140b9bc586ae7f40abc1249c97e1cc72d1b9d + cd /kernel + git config --global --add safe.directory /kernel + git log -n1 commit 4b1873bae088beb9764c2aa8e8558dce757537e4 Author: Matthew Brost <[email protected]> Date: Wed Aug 5 12:35:36 2026 -0700 drm/pagemap: Add fault injection for higher-order RAM folio allocation Migrating a device-private THP back to system memory has two distinct paths in __migrate_device_pages(): the fast path where both source and destination carry MIGRATE_PFN_COMPOUND, and the fallback path where the destination could only be satisfied with order-0 folios and the source THP therefore has to be split via migrate_vma_split_unmapped_folio(). The fallback path only triggers under genuine memory pressure, which makes it both rare and awkward to reproduce, yet it is the path where the interesting refcounting happens (the CPU fault holds an extra reference on the device folio taken by do_huge_pmd_device_private()). Add a fault_attr, modelled on backup_fault_inject in ttm_pool.c, that forces the higher-order allocation in drm_pagemap_migrate_populate_ram_pfn() to fail so the existing order-0 fallback is taken deterministically. The attribute is exposed at /sys/kernel/debug/drm_pagemap_fault_inject and requires CONFIG_FAULT_INJECTION_DEBUG_FS. With CONFIG_FAULT_INJECTION disabled the helper compiles out to a constant false and the injection has no cost. Cc: Andrew Morton <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: Lorenzo Stoakes <[email protected]> Cc: Zi Yan <[email protected]> Cc: Baolin Wang <[email protected]> Cc: Liam R. Howlett <[email protected]> Cc: Nico Pache <[email protected]> Cc: Ryan Roberts <[email protected]> Cc: Dev Jain <[email protected]> Cc: Barry Song <[email protected]> Cc: Lance Yang <[email protected]> Cc: Usama Arif <[email protected]> Cc: Joshua Hahn <[email protected]> Cc: Rakie Kim <[email protected]> Cc: Byungchul Park <[email protected]> Cc: Gregory Price <[email protected]> Cc: Ying Huang <[email protected]> Cc: Alistair Popple <[email protected]> Cc: Balbir Singh <[email protected]> Cc: Maarten Lankhorst <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Thomas Zimmermann <[email protected]> Cc: David Airlie <[email protected]> Cc: Simona Vetter <[email protected]> Cc: Thomas Hellström <[email protected]> Cc: Francois Dugast <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Assisted-by: GitHub_Copilot:claude-opus-5 Signed-off-by: Matthew Brost <[email protected]> + /mt/dim checkpatch 665722ddd6884c57624bd82d7ab886cf11a7b6f8 drm-intel ff6bb5e9a345 mm/migrate_device: Clear MIGRATE_PFN_MIGRATE on all sub-folios of a split THP -:20: WARNING:BAD_REPORTED_BY_LINK: Reported-by: should be immediately followed by Closes: or Link: with a URL to the report #20: Reported-by: Sashiko <[email protected]> Fixes: 4265d67e405a ("mm/migrate_device: add THP splitting during migration") -:71: CHECK:SPACING: spaces preferred around that '+' (ctx:VxV) #71: FILE: mm/migrate_device.c:1209: + src_pfns[i+j] &= ~MIGRATE_PFN_MIGRATE; ^ -:81: CHECK:SPACING: spaces preferred around that '+' (ctx:VxV) #81: FILE: mm/migrate_device.c:1218: + src_pfns[i+j] &= ~MIGRATE_PFN_MIGRATE; ^ total: 0 errors, 1 warnings, 2 checks, 24 lines checked c3d5999e0ac4 mm/migrate_device: Fix THP splitting of a CPU faulted device private folio 167436b6d312 mm/migrate_device: Apply the fault reference to the correct folio -:87: CHECK:SPACING: spaces preferred around that '+' (ctx:VxV) #87: FILE: mm/migrate_device.c:1305: + struct page *src_page = migrate_pfn_to_page(src_pfns[i+j]); ^ total: 0 errors, 0 warnings, 1 checks, 37 lines checked 05a8e52409db drm/pagemap: Fix folio allocation fallback and use-after-put 4b1873bae088 drm/pagemap: Add fault injection for higher-order RAM folio allocation