kq_acquire_packet_buffer(9)
kq_acquire_packet_buffer(9) π
okay bestie, this is the kq_acquire_packet_buffer(9) page from the Kernel API Manual, and it's giving kernel-queue ring-buffer realness. let's get into it π
β¨ NAME β¨
kq_acquire_packet_buffer β returns a pointer to the location in the kernel queue ring buffer where the calling function can write its packet. It is Guaranteed that there is enough space for that packet. It also updates the pending write pointer to that location so subsequent calls to acquire_packet_buffer will get a correct write pointer. periodt β¨
π¦ SYNOPSIS π¦
int kq_acquire_packet_buffer (struct kernel_queue *kq , size_t
packet_size_in_dwords , unsigned int **buffer_ptr );
that's the whole signature, no cap π«Ά
π ARGUMENTS π
kqβ-- undescribed --packet_size_in_dwordsβ-- undescribed --buffer_ptrβ-- undescribed --
the original page literally leaves all three as -- undescribed --, so I'm not gonna invent lore for them. iykyk π
πΈ DESCRIPTION πΈ
the DESCRIPTION section also name-drops these two routines, so here's the tea:
kq_submit_packetβ update the write pointer and doorbell of a kernel queue.kq_rollback_packetβ this routine is called if we failed to build an acquired packet for some reason. it just overwrites the pendingwptrwith the current one.
π₯ SEE ALSO π₯
- Kernel file
./drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.h
mwah π β this cutie came from ./drivers/gpu/drm/amd/amdkfd, dated October 2026, and the page is kq_acquire_packet_buffer(9). bye bestie π«Άπ
π¦ 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