amdgpu_vm_u...stats_locked(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… amdgpu_vm_update_stats_locked β€” Kernel API Manual, bestie edition πŸŽ€

okay so bestie, you know the Kernel API Manual? This is one of its pages, and it lives in ./drivers/gpu/drm/amd/amdgpu, dated October 2026. Buckle up, we're doing kernel accounting ✨


🌸 NAME 🌸

amdgpu_vm_update_stats_locked β€” the little helper that updates the normal memory stat 🫢 literally its whole job.


πŸ¦‹ SYNOPSIS πŸ¦‹

void amdgpu_vm_update_stats_locked (struct amdgpu_vm_bo_base *base ,
struct ttm_resource *res , int sign );

three args, no vibes wasted πŸ’…


✨ ARGUMENTS ✨

  • base β€” the base structure for tracking BO usage in a VM. it's giving main character energy for the bookkeeping πŸ‘‘
  • res β€” the ttm_resource we're using for the purpose of accounting. and no, it may or may not be bo->tbo.resource, so don't just assume πŸ™ˆ
  • sign β€” if we should add (+1) or subtract (-1) from the stat. that's it, that's the whole axis 😭

πŸ’– DESCRIPTION πŸ’–

Caller need to have the vm stats_lock held β€” like, this is the locked version, the name is not decorative, bestie πŸ”₯

It's useful for when multiple update need to happen at the same time. so you grab the lock once, do all your little updates, and slay as a batch ⭐

fr fr: no stats_lock, no service. hold the lock or don't call it 🫢

🌈 SEE ALSO 🌈

Kernel file ./drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c β€” plus the whole extended friend group, iykyk:


and that's the page, bestie 🧚 source: ./drivers/gpu/drm/amd/amdgpu, version vibes from October 2026, header amdgpu_vm_u...stats_locked(9) β€” go hold that lock πŸ’œ

πŸ“¦ where this page comes from