dma_fence_timestamp(9)
π dma_fence_timestamp(9) π
okay so bestie, welcome to the Kernel API Manual β we're talking about dma_fence_timestamp(9) today and honestly? she's a little diva with a very specific job π
β¨ NAME β¨
dma_fence_timestamp β the helper that gets you the completion timestamp of a fence, periodt π
πΈ SYNOPSIS πΈ
ktime_t dma_fence_timestamp (struct dma_fence *fence );
π¦ ARGUMENTS π¦
fenceβ the fence you want the timestamp from. that's it, that's the whole vibe check π«Ά
β DESCRIPTION β
okay so here's the tea β β once a fence gets signaled, the timestamp gets updated with the signaling time. iconic behaviour, no notes.
BUT (and this is the important part, ngl) setting that timestamp can race with tasks that are waiting for the signaling π like, they're all up in there at the same time and it gets messy.
so what does this helper do? it busy waits for the correct timestamp to appear. she literally stands there refreshing until the right value shows up. main character energy fr fr π
lowkey important: it's a busy wait β not a "go to sleep and wake me up later" situation. just so you know what you're getting into π
π₯ SEE ALSO π₯
the whole friend group, gathered for you π β kernel file ./include/linux/dma-fence.h plus:
struct dma_fence(9)struct dma_fence_cb(9)struct dma_fence_ops(9)dma_fence_was_initialized(9)dma_fence_put(9)dma_fence_get(9)dma_fence_get_rcu(9)dma_fence_get_rcu_safe(9)dma_fence_spinlock(9)dma_fence_lock_irqsave(9)dma_fence_unlock_irqrestore(9)dma_fence_assert_held(9)Safe external access to driver provided object members(9)dma_fence_is_signaled_locked(9)dma_fence_is_signaled(9)__dma_fence_is_later(9)dma_fence_is_later(9)dma_fence_is_later_or_same(9)dma_fence_later(9)dma_fence_get_status_locked(9)dma_fence_set_error(9)dma_fence_wait(9)dma_fence_is_array(9)dma_fence_is_chain(9)dma_fence_is_container(9)
aaaand that's the whole page bestie, you ate that πβ¨ this one lives in ./include/linux, it's the October 2026 edition of dma_fence_timestamp(9) β go forth and timestamp responsibly ππ§ββοΈπ
π¦ 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