✗ CI.checkpatch: warning for drm/ttm: Represent LRU bulk moves as nested sublists (rev3)
Patchwork <[email protected]>
| Newsgroups | org.freedesktop.lists.intel-xe |
|---|---|
| Message-ID | <178671486344.52452.14755543279844798698@61270ab9df2a> |
== Series Details == Series: drm/ttm: Represent LRU bulk moves as nested sublists (rev3) URL : https://patchwork.freedesktop.org/series/170311/ 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 44f5ff757939ec2f370b36781888bd168e9b8000 Author: Thomas Hellström <[email protected]> Date: Fri Aug 14 15:32:31 2026 +0200 drm/ttm: Represent LRU bulk moves as nested sublists The LRU bulk move mechanism tracked each (domain, priority) group as a {first, last} range of resources threaded directly on the manager LRU list. Group membership was implicit, derived from per-buffer-object back-pointers, and moving a group required first evacuating every cursor that pointed into the range. This range representation was fragile: the first/last endpoints could get out of sync with the actual list contents, for example on an empty range, or when a member was pinned, swapped out and later repopulated. That corrupted the manager LRU lists and caused crashes, notably during hibernation. Represent each bulk move group as a real nested sublist instead. Each (domain, priority) group owns a persistent anchor node, a new TTM_LRU_BULK item, linked on the manager LRU list, plus a sublist holding its member resources. Adding, removing and reordering members become unconditional list_move_tail()/list_del_init() operations that cannot leave stale endpoints behind, and moving a whole group is a single list_move_tail() of the anchor. The LRU walk descends into a group's sublist when it reaches the anchor and resumes the manager list afterwards. The cursor carries two hitches. The main hitch stays parked on the manager LRU list while the cursor descends, so that a concurrent bulk move of the anchor cannot make the walk skip entries, and a second hitch walks the sublist. Re-encountering a moved anchor simply re-walks its sublist, which is harmless. This removes the per-object back-pointer dereference during traversal and simplifies the cursor tracking and adjustment machinery, eliminating the class of range-corruption bugs by construction. v2: Detach descended cursors on bulk LRU bump. - Keep cursor detach on bulk finalize as a separate helper function. - Documentation update. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/5387 Assisted-by: GitHub_Copilot:claude-opus-4.8 Assisted-by: GitHub_Copilot:claude-sonnet-5 Signed-off-by: Thomas Hellström <[email protected]> Cc: Christian Koenig <[email protected]> Cc: Huang Rui <[email protected]> Cc: Matthew Auld <[email protected]> Cc: Matthew Brost <[email protected]> Cc: [email protected] + /mt/dim checkpatch 146f84b5515392408954060b5b684844c23256e9 drm-intel 44f5ff757939 drm/ttm: Represent LRU bulk moves as nested sublists -:255: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #255: FILE: drivers/gpu/drm/ttm/ttm_resource.c:104: +static void ttm_bulk_move_drop_cursors(struct ttm_device *bdev, + struct ttm_lru_bulk_move *bulk) total: 0 errors, 0 warnings, 1 checks, 626 lines checked