STRUCT QUEUE_PROPERTIES(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ struct queue_properties(9) πŸŽ€

okay so we're in the Kernel API Manual bestie, and today's main character is struct queue_properties β€” the glow-up blueprint for every single queue in the amdkfd fam. no cap, this one's a whole vibe. πŸ’…


✨ NAME ✨

struct queue_properties β€” literally the struct that holds all the queue properties. that's it, that's the name, the original page left the description blank and we're not about to invent one 🫢


🌸 SYNOPSIS 🌸

struct queue_properties {
    enum kfd_queue_type type;
    enum kfd_queue_format format;
    unsigned int queue_id;
    uint64_t queue_address;
    uint64_t queue_size;
    uint64_t metadata_queue_size;
    uint32_t priority;
    uint32_t queue_percent;
    void __user *read_ptr;
    void __user *write_ptr;
    void __iomem *doorbell_ptr;
    uint32_t doorbell_off;
    bool is_interop;
    bool is_evicted;
    bool is_suspended;
    bool is_being_destroyed;
    bool is_active;
    bool is_gws;
    uint32_t pm4_target_xcc;
    bool is_dbg_wa;
    bool is_user_cu_masked;
    bool is_reset;
    unsigned int vmid;
    uint32_t sdma_engine_id;
    uint32_t sdma_queue_id;
    uint32_t sdma_vm_addr;
    uint64_t eop_ring_buffer_address;
    uint32_t eop_ring_buffer_size;
    uint64_t ctx_save_restore_area_address;
    uint32_t ctx_save_restore_area_size;
    uint32_t ctl_stack_size;
    uint64_t tba_addr;
    uint64_t tma_addr;
    uint64_t exception_status;
    struct amdgpu_bo *wptr_bo;
    struct amdgpu_bo *rptr_bo;
    struct amdgpu_bo *ring_bo;
    struct amdgpu_bo *eop_buf_bo;
    struct amdgpu_bo *cwsr_bo;
};

like… look at her. 40 fields. she's iconic, she's thorough, she ate and left zero crumbs. πŸ‘‘


πŸ’– Members πŸ’–

  • type β€” the queue type. that's the whole description bestie, we move.
  • queue_id β€” the queue identifier. her little name tag 🏷️
  • queue_address β€” the queue ring buffer address.
  • queue_size β€” the queue ring buffer size.
  • priority β€” defines the queue priority relative to other queues in the process. ⚠️ important caveat: this is just an indication and HW scheduling may override the priority as necessary while keeping the relative prioritization. the priority granularity is from 0 to f, where f is the highest priority. currently all queues are initialized with the highest priority. so like… everyone's the main character rn πŸ’€
  • queue_percent β€” this field is partially implemented, and currently a zero in this field defines that the queue is non active. it's giving "we'll finish this later" πŸ™ˆ
  • read_ptr β€” user space address which points to the number of dwords the cp read from the ring buffer. this field updates automatically by the H/W β€” not you, bestie, the hardware handles it ✨
  • write_ptr β€” defines the number of dwords written to the ring buffer.
  • doorbell_ptr β€” notifies the H/W of a new packet written to the queue ring buffer. πŸ”” this field should be similar to write_ptr, and the user should update this field after updating the write_ptr. order matters, iykyk.
  • doorbell_off β€” the doorbell offset in the doorbell pci-bar.
  • is_interop β€” defines if this is a interop queue. interop queue means that the queue can access both graphics and compute resources. bilingual queen 🌈
  • is_evicted β€” defines if the queue is evicted. only active queues are evicted, rendering them inactive. 😭
  • is_active β€” defines if the queue is active or not. is_active and is_evicted are protected by the DQM lock πŸ”’ β€” do not come for them without the lock.
  • is_gws β€” defines if the queue has been updated to be GWS-capable or not. is_gws should be protected by the DQM lock, since changing it can yield the possibility of updating DQM state on number of GWS queues. so yeah… lock first, ask questions later πŸ”
  • vmid β€” if the scheduling mode is no cp scheduling, the field defines the vmid of the queue.
ngl the original page only spells out these members above β€” the rest of the fields are just living their lives in the struct up top, no write-up needed. we respect their privacy 🫢

πŸ¦‹ Description πŸ¦‹

this structure represents the queue properties for each queue, no matter if it's user mode or kernel mode queue. both. all of them. equal opportunity struct πŸ’œ


⭐ SEE ALSO ⭐

  • Kernel file ./drivers/gpu/drm/amd/amdkfd/kfd_priv.h
  • enum kfd_ioctl_flags(9)
  • enum kfd_unmap_queues_filter(9)
  • enum kfd_queue_type(9)
  • struct queue(9)
  • amdkfd_ioctl_t(9)
  • enum kfd_config_dequeue_wait_counts_cmd(9)

and that's the whole page, bestie β€” periodt. πŸŽ€ this lil drop is from ./drivers/gpu/drm/amd/amdkfd, dated October 2026, and honestly? she was serving kernel API realness the entire time. go read the source, ily, bye πŸ’–βœ¨

πŸ“¦ where this page comes from