STRUCT TTM_POOL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 struct ttm_pool(9) β€” the pool for all caching and orders 🌸

Okay so bestie, welcome to the tea on struct ttm_pool πŸ’… this is literally the pool that handles all your caching and orders β€” main character energy fr fr. It's a kernel struct, so you know it's giving serious business, but don't worry, we're gonna walk through it together 🫢


✨ SYNOPSIS ✨

struct ttm_pool {
    struct device *dev;
    int nid;
    unsigned int alloc_flags;
    struct {
      struct ttm_pool_type orders[NR_PAGE_ORDERS];
    } caching[TTM_NUM_CACHING_TYPES];
 };

πŸŽ€ Members πŸŽ€

  • dev β€” the device we're allocating pages for β€” like, the whole reason we're here, the main character device, periodt πŸ‘‘
  • nid β€” tells you which numa node to use β€” pick your fave node, bestie, no cap πŸ¦‹
  • alloc_flags β€” the TTM_ALLOCATION_POOL_* flags β€” these are the vibe flags that control how allocation goes down, iykyk πŸ”₯
  • caching β€” the actual pools for each caching type and order β€” this is where the magic happens, it's literally an array of struct ttm_pool_type orders[NR_PAGE_ORDERS] indexed by TTM_NUM_CACHING_TYPES, and the way that's structured? obsessed πŸ˜­πŸ’–

🌈 SEE ALSO 🌈

  • Kernel file ./include/drm/ttm/ttm_pool.h
  • struct ttm_pool_type(9) β€” go read that one too, bestie, it's iconic ✨

ngl this struct is lowkey doing a lot of heavy lifting behind the scenes β€” respect the grind πŸ’€πŸ‘‘

source: ./include/drm/ttm β€” dated October 2026 β€” that's the whole manual page bestie, slay πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from