STRUCT QUEUE(9)
π struct queue(9) π
bestie we are in the Kernel API Manual right now and this is the whole glow-up of struct queue
β¨ NAME β¨
struct queue β that's it, that's the name, she's just a struct and she's iconic for it π
β¨ SYNOPSIS β¨
struct queue {
struct list_head list;
void *mqd;
struct kfd_mem_obj *mqd_mem_obj;
uint64_t gart_mqd_addr;
struct queue_properties properties;
uint32_t mec;
uint32_t pipe;
uint32_t queue;
unsigned int sdma_id;
unsigned int doorbell_id;
struct kfd_process *process;
struct kfd_node *device;
void *gws;
struct kobject kobj;
void *gang_ctx_bo;
uint64_t gang_ctx_gpu_addr;
void *gang_ctx_cpu_ptr;
uint32_t gang_ctx_array_index;
struct amdgpu_bo *wptr_bo_gart;
bool needs_mqd_repin;
};
likeβ¦ look at her. twenty fields. main character energy fr fr π
πΈ Members πΈ
okay so now we go field by field, no skipping, no cap:
listβ the queue linked list. that's the lil thread that keeps everybody connected π§΅mqdβ the queue MQD (memory queue descriptor). yes the acronym is in the description, memorise it π«Άmqd_mem_objβ the MQD local gpu memory object.gart_mqd_addrβ the MQD gart mc address.propertiesβ the queue properties. it's giving "everything you need to know about this queue" β¨mecβ used only in no cp scheduling mode, and it identifies the micro engine id that the queue should be executed on.pipeβ used only in no cp scheduling mode, and it identifies the queue's pipe id.queueβ used only in no cp scheduling mode, and it identifies the queue's slot. (also the struct is namedqueueand this member is namedqueue, and honestly? chaotic. love her π)processβ the kfd process that created this queue. her parent, essentially πdeviceβ the kfd device that created this queue. the other parent π₯οΈgwsβ pointing to gwskgd_memif this is a gws control queue;NULLotherwise.
β οΈ real talk bestie: the synopsis lists more fields than the Members section actually describes βsdma_id,doorbell_id,kobj,gang_ctx_bo,gang_ctx_gpu_addr,gang_ctx_cpu_ptr,gang_ctx_array_index,wptr_bo_gartandneeds_mqd_repinare all up there in the struct but the manpage doesn't hand out descriptions for them. don't invent lore, just know they're there π
π¦ Description π¦
so this structure represents user mode compute queues and it contains all the necessary data to handle such queues. that's the whole vibe check: everything a compute queue needs to exist and be handled, all in one struct. slay π
π SEE ALSO π
go read these next, iykyk:
- Kernel file
./drivers/gpu/drm/amd/amdkfd/kfd_priv.henum kfd_ioctl_flags(9)enum kfd_unmap_queues_filter(9)enum kfd_queue_type(9)struct queue_properties(9)amdkfd_ioctl_t(9)enum kfd_config_dequeue_wait_counts_cmd(9)
and that's the page bestie π ok so the sign-off: this came out of ./drivers/gpu/drm/amd/amdkfd and it's dated October 2026 β so yeah, from the future, obviously πβ¨ go touch some queues π¦
π¦ 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