STRUCT TTM_OPERATION_CTX(9)
π
struct ttm_operation_ctx(9)
okay so bestie, welcome to the Kernel API Manual page for struct ttm_operation_ctx. itβs short, itβs useful, and itβs lowkey the little context gremlin behind TTM operations. π
β¨
πΈ NAME πΈ
struct ttm_operation_ctx β
thatβs the whole name line: just the struct name and a dash. minimal, mysterious, iconic. π
β¨ SYNOPSIS β¨
hereβs the entire struct, character-for-character, no edits, no cap:
struct ttm_operation_ctx {
bool interruptible;
bool no_wait_gpu;
bool gfp_retry_mayfail;
bool allow_res_evict;
struct dma_resv *resv;
uint64_t bytes_moved;
};
π Members π
every member, bestie β nothing skipped:
interruptibleβ sleep interruptible if sleeping. thatβs it; interruptible sleep, periodt. π¦no_wait_gpuβ return immediately if the GPU is busy. no waiting around, we bounce. π¨gfp_retry_mayfailβ when allocating pages, use__GFP_RETRY_MAYFAIL | __GFP_NOWARN. the reason? to avoid invoking the OOM killer when populating a buffer object, so the error can be forwarded for it to be dealt with. ππ₯allow_res_evictβ allow eviction of reserved BOs. can be used when multiple BOs share the same reservation objectresv. πresvβ reservation object to be used together withallow_res_evict. they go together, iykyk. πbytes_movedβ statistics on how many bytes have been moved. literally the bytes-moved counter. β
π Description π
this is the context for TTM operations like changing buffer placement or general memory allocation. itβs giving βI hold the operation context so you donβt have to.β β¨
π₯ SEE ALSO π₯
go read these too, bestie β the whole little TTM cinematic universe:
- Kernel file
./include/drm/ttm/ttm_bo.h enum ttm_bo_type(9)struct ttm_buffer_object(9)struct ttm_bo_kmap_obj(9)struct ttm_lru_walk_arg(9)struct ttm_lru_walk(9)struct ttm_bo_shrink_flags(9)ttm_bo_reserve(9)ttm_bo_reserve_slowpath(9)ttm_bo_move_null(9)ttm_bo_unreserve(9)ttm_kmap_obj_virtual(9)struct ttm_bo_lru_cursor(9)ttm_bo_lru_for_each_reserved_guarded(9)
source/version: ./include/drm/ttm Β· date: October 2026 Β· manual page: struct ttm_operation_ctx(9) β bye bestie, go move some bytes! ππ¦
π¦ 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