xe_mem_pool_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 β€” the xe_tile where 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:


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