STRUCT QUEUE_PROPERTIES(9)
π 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 from0tof, wherefis 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 towrite_ptr, and the user should update this field after updating thewrite_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_activeandis_evictedare 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_gwsshould 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
- 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