STRUCT DEVICE_QUEUE_MANAGER_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

okay bestie, welcome to the struct device_queue_manager_ops(9) page β€” this is a Kernel API Manual situation, and it's basically the master ops table for the device queue manager (dqm, if you're on nickname terms). No description line in the original, so no cap, we're going straight in ✨


🌸 SYNOPSIS 🌸

like, here's the whole struct, character for character, don't @ me:

struct device_queue_manager_ops {
    int (*create_queue)(struct device_queue_manager *dqm, struct queue
*q, struct qcm_process_device *qpd, const struct
kfd_criu_queue_priv_data *qd, const void *restore_mqd, const void
*restore_ctl_stack);
    int (*destroy_queue)(struct device_queue_manager *dqm, struct
qcm_process_device *qpd, struct queue *q);
    int (*update_queue)(struct device_queue_manager *dqm, struct queue
*q, struct mqd_update_info *minfo);
    int (*register_process)(struct device_queue_manager *dqm, struct
qcm_process_device *qpd);
    int (*unregister_process)(struct device_queue_manager *dqm, struct
qcm_process_device *qpd);
    int (*initialize)(struct device_queue_manager *dqm);
    int (*start)(struct device_queue_manager *dqm);
    int (*stop)(struct device_queue_manager *dqm);
    void (*uninitialize)(struct device_queue_manager *dqm);
    int (*halt)(struct device_queue_manager *dqm);
    int (*unhalt)(struct device_queue_manager *dqm);
    int (*create_kernel_queue)(struct device_queue_manager *dqm, struct
kernel_queue *kq, struct qcm_process_device *qpd);
    void (*destroy_kernel_queue)(struct device_queue_manager *dqm,
struct kernel_queue *kq, struct qcm_process_device *qpd);
    bool (*set_cache_memory_policy)(struct device_queue_manager *dqm,
struct qcm_process_device *qpd, enum cache_policy default_policy, enum
cache_policy alternate_policy, void __user *alternate_aperture_base,
uint64_t alternate_aperture_size, u32 misc_process_properties);
    int (*process_termination)(struct device_queue_manager *dqm, struct
qcm_process_device *qpd);
    int (*evict_process_queues)(struct device_queue_manager *dqm, struct
qcm_process_device *qpd);
    int (*restore_process_queues)(struct device_queue_manager *dqm,
struct qcm_process_device *qpd);
    int (*get_wave_state)(struct device_queue_manager *dqm, struct queue
*q, void __user *ctl_stack, u32 *ctl_stack_used_size, u32
*save_area_used_size);
    int (*reset_queues)(struct device_queue_manager *dqm, uint16_t
pasid);
    int (*get_queue_checkpoint_info)(struct device_queue_manager *dqm,
const struct queue *q, u32 *mqd_size, u32 *ctl_stack_size);
    int (*checkpoint_mqd)(struct device_queue_manager *dqm, const struct
queue *q, void *mqd, void *ctl_stack);
    void (*set_perfcount)(struct device_queue_manager *dqm, int enable);
 };

πŸŽ€ Members πŸŽ€

every single one, bestie, we're not skipping a single function pointer πŸ‘‘

  • create_queue β€” the queue creation routine. making babies (queues) fr fr 🍼
  • destroy_queue β€” the queue destruction routine. rip bozo, queue edition πŸ’€
  • update_queue β€” the queue update routine. glow-up time ✨
  • register_process β€” this routine associates a specific process with device. it's giving "you two are dating now" 🫢
  • unregister_process β€” destroys the associations between process to device. breaking up, no cap 😭
  • initialize β€” initializes the pipelines and memory module for that device. setting up the whole aesthetic πŸŽ€
  • start β€” initializes the resources/modules the device needs for queues execution. This function is called on device initialization and after the system woke up after suspension. so like, first day of school AND the first day back after a nap 🌈
  • stop β€” this routine stops execution of all the active queue running on the H/W and basically this function called on system suspend. night night, queues 😴
  • uninitialize β€” destroys all the device queue manager resources allocated in initialize routine. everything the initialize routine built? gone. iconic cleanup energy 🧹
  • halt β€” this routine unmaps queues from runlist and set halt status to true so no more queues will be mapped to runlist until unhalt. it's giving "closed for renovations" 🚧
  • unhalt β€” this routine unset halt status to flase and maps queues back to runlist. we're SO back, the queues are back on the runlist πŸ”₯
  • create_kernel_queue β€” creates kernel queue. Used for debug queue. lowkey just for debugging πŸ›
  • destroy_kernel_queue β€” destroys kernel queue. Used for debug queue. same vibe, reverse direction 🫑
  • set_cache_memory_policy β€” sets memory policy (cached/ non cached) for the memory apertures. choosing an outfit for your memory: cached or non cached πŸ’…
  • process_termination β€” clears all process queues belongs to that device. sweep it all away 🧹
  • evict_process_queues β€” Evict all active queues of a process. get out of the runlist, you're evicted πŸšͺ
  • restore_process_queues β€” Restore all evicted queues of a process. welcome home babes 🏠
  • get_wave_state β€” retrieves context save state and optionally copies the control stack, if kept in the MQD, to the given userspace address. it's giving "screenshot your whole setup" πŸ“Έ
  • reset_queues β€” reset queues which consume RAS poison. poison? cleansed. periodt πŸ§ͺ
  • get_queue_checkpoint_info β€” retrieves queue size information for CRIU checkpoint. CRIU said "how big is it" πŸ“
  • checkpoint_mqd β€” checkpoint queue MQD contents for CRIU. saving the whole MQD vibe for later πŸ’Ύ
  • set_perfcount β€” no prose in the original, so i'll just say: this is where set_perfcount lives, and it takes int enable 😌
bestie heads up: this page is literally just the struct + the members section. no options, no exit statuses, no environment variables, no bugs section, no examples. if you were waiting for a plot twist, there isn't one πŸ™ˆ

πŸ’– SEE ALSO πŸ’–

go read these next, i'm obsessed:

  • Kernel file ./drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h
  • struct device_queue_manager(9)

and that's a wrap, bestie πŸ¦‹ this was struct device_queue_manager_ops(9) from the Kernel API Manual, living in ./drivers/gpu/drm/amd/amdkfd, dated October 2026 β€” slay, go read the header file, mwah πŸ’œπŸŽ€

πŸ“¦ where this page comes from