get_next_vm_bo_from_list(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… get_next_vm_bo_from_list πŸ’…

okay bestie, this page is from the Kernel API Manual, and it’s giving β€œtiny helper, huge lockless-iteration energy” ✨

✨ NAME ✨

get_next_vm_bo_from_list β€” get the next vm_bo element πŸ’–

πŸŽ€ SYNOPSIS πŸŽ€

get_next_vm_bo_from_list (__gpuvm , __list_name , __local_list ,
       __prev_vm_bo );

🌸 ARGUMENTS 🌸

  • __gpuvm β€” the drm_gpuvm
  • __list_name β€” the name of the list we’re iterating on
  • __local_list β€” a pointer to the local list used to store already iterated items
  • __prev_vm_bo β€” the previous element we got from get_next_vm_bo_from_list

πŸ¦‹ DESCRIPTION πŸ¦‹

This helper exists to give you lockless list iteration. β€œLockless” here means the iterator releases the lock immediately after picking the first element from the list β€” so list insertion and deletion can happen concurrently. No cap.

Elements popped from the original list are kept in a local list, so removal and is_empty checks can still happen while we’re iterating the list. Iconic behavior, honestly.

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/gpu/drm/drm_gpuvm.c β€” and yes, the whole squad is here:

bye bestie β€” source/version is ./drivers/gpu/drm, and the date on this one is October 2026 πŸ’–βœ¨

πŸ“¦ where this page comes from