xe_mem_pool_...hadow_locked(9)
π xe_mem_pool_swap_shadow_locked(9)
okay so this is a page straight out of the Kernel API Manual β the xe_mem_pool_...hadow_locked(9) one, bestie, and it's lowkey iconic. it's all about the xe memory pool and how we do the classic switcheroo on buffer objects. buckle up π
β¨ NAME β¨
xe_mem_pool_swap_shadow_locked β literally swaps the primary BO with the shadow BO. that's it, that's the whole vibe. π¦
πΈ SYNOPSIS πΈ
void xe_mem_pool_swap_shadow_locked (struct xe_mem_pool *pool );
no cap, that's the signature. short, sweet, and ready to rearrange your BOs. β¨
π«Ά ARGUMENTS π«Ά
poolβ the memory pool that's holding both the primary and the shadow BOs. she's the main character here, she contains multitudes π
π₯ DESCRIPTION π₯
okay bestie, so what this does: it swaps the primary buffer object with the shadow buffer object inside the mem pool. the way that this works is genuinely clever β it lets you do atomic updates to the contents of the primary BO by first writing to the shadow BO and then swapping it with the primary BO. write first, swap second, atomicity preserved, we love to see it. π
β οΈ but listen β Swap_guard must be held to make sure everything stays synced up with any concurrent swap operations. do not skip the guard, bestie, that's a whole mess waiting to happen. π
π RETURN π
None. nothing comes back. void. empty. she gives nothing and that's on purpose π
π§ SEE ALSO π§
kernel file ./drivers/gpu/drm/xe/xe_mem_pool.c, plus the whole squad:
struct xe_mem_pool(9)xe_mem_pool_init(9)xe_mem_pool_sync(9)xe_mem_pool_sync_shadow_locked(9)xe_mem_pool_gpu_addr(9)xe_mem_pool_cpu_addr(9)xe_mem_pool_bo_swap_guard(9)xe_mem_pool_bo_flush_write(9)xe_mem_pool_bo_sync_read(9)xe_mem_pool_alloc_node(9)xe_mem_pool_insert_node(9)xe_mem_pool_free_node(9)xe_mem_pool_node_cpu_addr(9)xe_mem_pool_dump(9)
and that's the whole page, bestie β go read the friends, they're all waiting π
mwah π this came from ./drivers/gpu/drm/xe and is dated October 2026 β the xe_mem_pool_...hadow_locked(9) chronicles, signed, sealed, delivered β¨ππ¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms