STRUCT KFD_IOCTL_DBG_TRAP_SUSPEND_QUEUES_ARGS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct kfd_ioctl_dbg_trap_suspend_queues_args(9) πŸ¦‹

okay bestie, welcome to the Kernel API Manual page for struct kfd_ioctl_dbg_trap_suspend_queues_args β€” it's giving debugger queue-suspend energy, and we're gonna get through every single bit together. πŸ’…

πŸ’– NAME πŸ’–

struct kfd_ioctl_dbg_trap_suspend_queues_args β€” Arguments for KFD_IOC_DBG_TRAP_SUSPEND_QUEUES. That's literally the whole name vibe: this struct is the args bundle for that ioctl, periodt. ✨

πŸ“œ SYNOPSIS πŸ“œ

here's the shape, bestie β€” do not freestyle the field types, they're iconic and exact. πŸ‘‘

struct kfd_ioctl_dbg_trap_suspend_queues_args {
    __u64 exception_mask;
    __u64 queue_array_ptr;
    __u32 num_queues;
    __u32 grace_period;
 };

πŸ‘― Members πŸ‘―

  • exception_mask β€” (IN) - raised exceptions to clear. So this mask says which exceptions we're clearing, okay? πŸ’…
  • queue_array_ptr β€” (IN) - pointer to array of queue ids (u32 per queue id) to suspend. So it's a pointer to a u32-per-queue-id array, and those are the queue ids we're suspending. 🫢
  • num_queues β€” (IN) - number of queues to suspend in queue_array_ptr. That's how many entries in the array we're actually using, bestie. πŸ”’
  • grace_period β€” (IN) - wave time allowance before preemption per 1K GPU clock cycle unit. This is the grace period, in 1K GPU clock cycle units. ⏳

🌸 Description 🌸

Suspending queues is the whole assignment here. Suspend queues. That's the main character behavior. πŸ‘‘

Generic errors apply (see kfd_dbg_trap_operations). No cap, the generic error rules are still in the group chat. 😭

Destruction of a suspended queue is blocked until the queue is resumed. This is the safety lock: it allows the debugger to access queue information and the its context save area without running into a race condition on queue destruction. Literally the whole point of the block. πŸ”’

It automatically copies per queue context save area header information into the save area base (see kfd_queue_snapshot_entry and kfd_context_save_area_header). So yes, that header info gets copied for you. πŸŽ€

On the return tip: Return - Number of queues suspended on SUCCESS. Yep, SUCCESS means you get the count, periodt. βœ…

For each queue id in the queue_array_ptr array, KFD_DBG_QUEUE_ERROR_MASK and KFD_DBG_QUEUE_INVALID_MASK are masked and report the unsuccessful suspend reason. πŸ’€

  • KFD_DBG_QUEUE_ERROR_MASK = HW failure. like, hardware said no. πŸ”₯
  • KFD_DBG_QUEUE_INVALID_MASK = queue does not exist, is new or is being destroyed. ghost queue behavior. πŸ‘»

πŸ”— SEE ALSO πŸ”—

Go read these too, bestie β€” the whole KFD ioctl cinematic universe is linked here: 🌈

  • Kernel file ./include/uapi/linux/kfd_ioctl.h struct kfd_ioctl_criu_args(9)
  • enum kfd_ioctl_svm_op(9)
  • enum kfd_ioctl_svm_attr_type(9)
  • struct kfd_ioctl_svm_attribute(9)
  • struct kfd_ioctl_svm_args(9)
  • struct kfd_ioctl_set_xnack_mode_args(9)
  • struct kfd_ioctl_runtime_enable_args(9)
  • struct kfd_ioctl_dbg_trap_enable_args(9)
  • struct kfd_ioctl_dbg_trap_send_runtime_event_args(9)
  • struct kfd_ioctl_dbg_trap_set_exceptions_enabled_args(9)
  • struct kfd_ioctl_dbg_trap_set_wave_launch_override_args(9)
  • struct kfd_ioctl_dbg_trap_set_wave_launch_mode_args(9)
  • struct kfd_ioctl_dbg_trap_resume_queues_args(9)
  • struct kfd_ioctl_dbg_trap_set_node_address_watch_args(9)
  • struct kfd_ioctl_dbg_trap_clear_node_address_watch_args(9)
  • struct kfd_ioctl_dbg_trap_set_flags_args(9)
  • struct kfd_ioctl_dbg_trap_query_debug_event_args(9)
  • struct kfd_ioctl_dbg_trap_query_exception_info_args(9)
  • struct kfd_ioctl_dbg_trap_queue_snapshot_args(9)
  • struct kfd_ioctl_dbg_trap_device_snapshot_args(9)
  • struct kfd_ioctl_dbg_trap_args(9)
  • struct kfd_ioctl_pmc_settings(9)

okay bye bestie, the source/version is ./include/uapi/linux, dated October 2026, and this page is struct kfd_ioctl_dbg_trap_suspend_queues_args(9) β€” drink water and don't race on queue destruction πŸ’–βœ¨

πŸ“¦ where this page comes from