xe_mem_pool_init(9)
π xe_mem_pool_init(9) π
okay so welcome to the Kernel API Manual bestie, we're literally about to set up a whole memory pool together and it's gonna slay π«Ά
β¨ NAME β¨
xe_mem_pool_init β initialize a memory pool, that's the whole vibe π
πΈ SYNOPSIS πΈ
struct xe_mem_pool * xe_mem_pool_init (struct xe_tile *tile , u32 size ,
u32 guard , int flags );
like, that's the whole signature, no cap β¨
π ARGUMENTS π
tileβ thexe_tilewhere allocate. that's your spot, your main character location πsizeβ number of bytes to allocate. yes, in bytes, we're measuring πguardβ the size of the guard region at the end of the BO that is not sub-allocated, in bytes. it's giving "reserved parking spot only for the guard region" π§flagsβ flags to use to create shadow pool. the personality settings, basically π¦
π§ DESCRIPTION π§
so what this actually does: it initializes a memory pool for sub-allocating memory from a backing BO on the specified XE tile. iconic behaviour, honestly π₯
the backing BO gets pinned in the GGTT and mapped into the CPU address space for direct access β yes bestie, direct access, no middleman, we love efficiency β
optionally, a shadow BO can also be initialized for atomic updates to the primary BO's contents. like a little backup twin doing synchronized swimming π
π RETURN π
a pointer to the xe_mem_pool, or an error pointer on failure π β so like, always vibe check your return value, fr fr.
ngl an error pointer is NOT a normal pointer, so please don't just dereference it and act surprised. π
β SEE ALSO β
the kernel file lives at ./drivers/gpu/drm/xe/xe_mem_pool.c, and if you wanna go deeper (iykyk) the whole squad is here:
struct xe_mem_pool(9)xe_mem_pool_sync(9)xe_mem_pool_swap_shadow_locked(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)
okay that's the whole page, mwah π this one shipped from ./drivers/gpu/drm/xe and it's dated October 2026 β so go forth, init your pools, and remember: no leaks, only slay π
β¨π
π¦ 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