async_schedule_dev(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

โœจ async_schedule_dev(9) โœจ

okay so bestie, we're in the Kernel API Manual today and this little function is genuinely kind of iconic ๐Ÿ’… it's the device-specific glow-up of async_schedule, and it's here to make your async work land on the right CPU. buckle up ๐ŸŽ€


๐ŸŒธ NAME ๐ŸŒธ

async_schedule_dev โ€” a device specific version of async_schedule ๐Ÿฆ‹


โญ SYNOPSIS โญ

async_cookie_t async_schedule_dev (async_func_t func , struct device
*dev );

๐Ÿงš ARGUMENTS ๐Ÿงš

  • func โ€” the function to execute asynchronously, like literally the whole point of this thing โœจ
  • dev โ€” the device argument to be passed to the function, and also the vibe-check reference for where it runs ๐Ÿ“

๐Ÿ’… DESCRIPTION ๐Ÿ’…

So what you get back is an async_cookie_t, and no cap, you're gonna want to hold onto it โ€” it may be used for checkpointing later ๐Ÿชโœจ

Here's the slay part: dev is used as both the argument for the function and to provide NUMA context for where to run the function. the way that works is we can try to provide for the best possible outcome by operating on the device on the CPUs closest to the device ๐Ÿ‘‘

likeโ€ฆ efficiency? we invented it. periodt. ๐Ÿ”ฅ


๐Ÿ’€ NOTE ๐Ÿ’€

this function may be called from atomic or non-atomic contexts ๐Ÿ™ˆ so you're covered either way, bestie. no gatekeeping here ๐Ÿ’–

just clocking it so you know: atomic and non-atomic are both on the menu. that's the whole note. don't overthink it ๐Ÿซถ

๐Ÿ”ฎ SEE ALSO ๐Ÿ”ฎ

go read the whole async family, they're all main character energy in their own way ๐ŸŒˆโญ


okay that's the page!! ๐ŸŽ€ this fab little page lives in ./include/linux and it's dated October 2026, and obviously it's the async_schedule_dev(9) manual page โ€” mwah, go forth and schedule asynchronously ๐Ÿ’œ๐Ÿงšโ€โ™€๏ธ

๐Ÿ“ฆ where this page comes from