amdgpu_bo_m...ts_placement(9)
π amdgpu_bo_mem_stats_placement(9) β¨
okay bestie so this is a page straight outta the Kernel API Manual β yes, that Kernel API Manual β and it's about the teeny tiny function amdgpu_bo_mem_stats_placement. it's giving "small function, very important job" energy, and honestly? we're obsessed. let's get into it π
πΈ NAME πΈ
amdgpu_bo_mem_stats_placement β the bo placement situation for memory accounting, iykyk π
β SYNOPSIS β
uint32_t amdgpu_bo_mem_stats_placement (struct amdgpu_bo *bo );
like, that's the whole signature. look at her. so clean, so minimal, main character energy fr fr β¨
π¦ ARGUMENTS π¦
boβ the buffer object we should look at π that's literally the entire vibe, she's the one we're inspecting, no cap
π₯ DESCRIPTION π₯
okay so here's the tea π΅: a BO can have multiple preferred placements, right? and if we just counted it under all of them we'd be double counting, which is lowkey a mess for memory stats π like bestie we are NOT doing that.
so to avoid the double counting, we want to file that BO under a single placement for memory stats. one BO, one slot, periodt. π
and luckily β and this is the iconic part β if we take the highest set bit in preferred_domains, the result is quite sensible π like the universe just... handed us the answer? thank u honestly π«Ά
π RETURN π
which of the placements should the BO be accounted under π (yes, that's the whole return value, she tells you where the BO belongs, that's her job and she ate)
πΊ SEE ALSO πΊ
the kernel file lives right here, bestie:
./drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
and now the full friend group π (all of these are (9) pages, we're keeping them exactly as they are because we respect the lore):
amdgpu_object(9)amdgpu_bo_is_amdgpu_bo(9)amdgpu_bo_placement_from_domain(9)amdgpu_bo_create_reserved(9)amdgpu_bo_create_kernel(9)amdgpu_bo_create_isp_user(9)amdgpu_bo_create_kernel_at(9)amdgpu_bo_free_kernel(9)amdgpu_bo_free_isp_user(9)amdgpu_bo_create(9)amdgpu_bo_create_user(9)amdgpu_bo_create_vm(9)amdgpu_bo_kmap(9)amdgpu_bo_kptr(9)amdgpu_bo_kunmap(9)amdgpu_bo_ref(9)amdgpu_bo_unref(9)amdgpu_bo_pin(9)amdgpu_bo_unpin(9)amdgpu_bo_init(9)amdgpu_bo_fini(9)amdgpu_bo_set_tiling_flags(9)amdgpu_bo_get_tiling_flags(9)amdgpu_bo_set_metadata(9)amdgpu_bo_get_metadata(9)amdgpu_bo_move_notify(9)amdgpu_bo_release_notify(9)amdgpu_bo_fault_reserve_notify(9)amdgpu_bo_fence(9)amdgpu_bo_sync_wait_resv(9)amdgpu_bo_sync_wait(9)amdgpu_bo_gpu_offset(9)amdgpu_bo_fb_aper_addr(9)amdgpu_bo_gpu_offset_no_check(9)amdgpu_bo_get_preferred_domain(9)amdgpu_bo_print_info(9)
like okay go off, entire BO API family π that's a whole squad and they're all iconic π
and that's the page!! this absolute gem lives over in ./drivers/gpu/drm/amd/amdgpu and it was dated October 2026 β yes, the future, we said what we said π§π mwah, go read amdgpu_object.c bestie, ily π«Ά
π¦ 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