ttm_bo_move_memcpy(9)
β¨ ttm_bo_move_memcpy(9) β¨
okay so this is a page from the Kernel API Manual, bestie β it's ttm_bo_move_memcpy and it lives in section 9 π
πΈ NAME πΈ
ttm_bo_move_memcpy β and honestly? that's it. that's the whole name section. the original literally just has a lil dash there with no description, so i'm not gonna make one up for you π
(the vibes are "mysterious", the facts are "empty", and we respect that)
π¦ SYNOPSIS π¦
int ttm_bo_move_memcpy (struct ttm_buffer_object *bo , struct
ttm_operation_ctx *ctx , struct ttm_resource *dst_mem );
so it's an int-returning function, three args, and yes the spacing in the prototype is exactly that, don't @ me, i'm copying it verbatim because that's the whole point π«Ά
π ARGUMENTS π
boβ a pointer to astruct ttm_buffer_object. that's the buffer object we're talking about, she's the main character of this operation πctxβ the operation context β¨dst_memβ astruct ttm_resourcethat tells you where we're moving to. the destination. the final destination (no cap) π―
π₯ DESCRIPTION π₯
okay so picture this: this is the fallback move function for a mappable buffer object in mappable memory. like when nobody fancy is available, this is the one who shows up and gets it done πͺ
here's the tea on what happens when it works:
- it frees any old aperture space (bye old space π)
- it sets
(new_mem)->mm_nodetoNULL - it updates the
(bo)->memplacement flags β¨
and here's the tea on what happens when it doesn't work, and this part matters so listen up:
if it's unsuccessful, the old data remains untouched β nothing lost, she's fine β and it's up to the caller to free the memory space indicated by new_mem. yes, that's your job now. the function is not doing it for you. i don't make the rules π«
β RETURN β
!0: Failure. (that's "not zero means failure" β zero means you're slaying, anything else means nope π)
π§ SEE ALSO π§
the kernel file lives at ./drivers/gpu/drm/ttm/ttm_bo_util.c and here's the full bestie list, no skips, no cuts, periodt:
ttm_move_memcpy(9)ttm_buffer_object_transfer(9)ttm_io_prot(9)ttm_bo_kmap_try_from_panic(9)ttm_bo_kmap(9)ttm_bo_kunmap(9)ttm_bo_vmap(9)ttm_bo_vunmap(9)ttm_bo_move_accel_cleanup(9)ttm_bo_move_sync_cleanup(9)ttm_bo_pipeline_gutting(9)ttm_lru_walk_for_evict(9)ttm_bo_lru_cursor_fini(9)ttm_bo_lru_cursor_init(9)ttm_bo_lru_cursor_next(9)ttm_bo_lru_cursor_first(9)ttm_bo_shrink(9)ttm_bo_shrink_suitable(9)ttm_bo_shrink_avoid_wait(9)
go read some of those, iykyk π
π sign-off π
this page came from the ./drivers/gpu/drm/ttm corner of the kernel, and it's dated October 2026 β that's the source, the version vibe, and the date all wrapped up in one cute lil bow. mwah π go move some memory, bestie π
π¦ 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