ttm_pool_alloc(9)
๐ ttm_pool_alloc(9) ๐
okay so bestie, welcome to the ttm_pool_alloc page from the Kernel API Manual โ yes, the manual name is literally "Kernel API Manual", we're in the big leagues now ๐
โจ NAME โจ
ttm_pool_alloc โ fill a ttm_tt object ๐ซถ
๐ธ SYNOPSIS ๐ธ
int ttm_pool_alloc (struct ttm_pool *pool , struct ttm_tt *tt , struct
ttm_operation_ctx *ctx );
like, that's the whole vibe: you give it three things, it hands you back an int. iconic signature honestly ๐
๐ฆ ARGUMENTS ๐ฆ
poolโ thettm_poolyou're gonna use. this is the main character of the operation tbh ๐ttโ thettm_ttobject you're filling up. she's getting stuffed with pages, no cap ๐ญctxโ the operation context. your little sidecar of context for the call โจ
๐ซ DESCRIPTION ๐ซ
so what does it actually do? it fills the ttm_tt object with pages โ like, actual pages, going in โ and it also makes sure to DMA map them when that's necessary. that's it, that's the whole job. not me thinking that's kind of a lot of work for one function ๐ฎโ๐จ but she ate, fr fr ๐ฅ
๐ RETURN ๐
0 on successe, negative error code otherwise.
ok so yes, the source literally says "successe" โ we're not fixing it, we're respecting the original author's journey ๐๐ but to be clear: 0 = good vibes, a negative error code = something went sideways. periodt.
๐ SEE ALSO ๐
Kernel file ./drivers/gpu/drm/ttm/ttm_pool.c, plus the whole friend group:
struct ttm_pool_dma(9)struct ttm_pool_alloc_state(9)struct ttm_pool_tt_restore(9)Partial backup and restoration of a struct ttm_tt.(9)ttm_pool_free_range(9)ttm_pool_restore_and_alloc(9)ttm_pool_free(9)ttm_pool_drop_backed_up(9)ttm_pool_backup(9)ttm_pool_init(9)ttm_pool_synchronize_shrinkers(9)ttm_pool_fini(9)ttm_pool_debugfs(9)ttm_pool_mgr_init(9)ttm_pool_mgr_fini(9)
and that's the page!! ๐งโโ๏ธ sourced straight from ./drivers/gpu/drm/ttm, dated October 2026, and filed under ttm_pool_alloc(9) โ go forth and fill those ttm_tt objects bestie, you've got this ๐๐โญ
๐ฆ 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