min_chan(9)
β¨ NAME β¨
Hey bestie, welcome to the min_chan(9) manual π β yes, min_chan(9), the one and only. It finds the channel with min count and in the same NUMA-node as the CPU. That's the whole assignment, and it ate. π
π¦ SYNOPSIS π¦
struct dma_chan * min_chan (enum dma_transaction_type cap , int cpu );
πΈ ARGUMENTS πΈ
capβ the capability to match, aka the specific vibe the channel has to have. β¨cpuβ the CPU index which the channel should be close to. Think "near this CPU, please." π«Ά
π DESCRIPTION π
Okay so here's the situation: if some channels are close to the given CPU, the one with the lowest reference count is returned. That's the main character pick. π
Otherwise? The CPU is ignored, and only the reference count is taken into account. Not me ignoring the CPU β it's literally what the function does π. Lowkey simple, highkey important, iykyk.
π¨ Lock check, bestie: this must be called underdma_list_mutex. Like,dma_list_mutexis not a suggestion. Do not skip it. Periodt.
π₯ SEE ALSO π₯
Kernel file ./drivers/dma/dmaengine.c β plus the whole squad (iykyk): dev_to_dma_chan(9), struct dma_chan_tbl_ent(9), dma_chan_is_local(9), dma_channel_rebalance(9), balance_ref_count(9), dma_chan_get(9), dma_chan_put(9), dma_find_channel(9), dma_issue_pending_all(9), dma_get_slave_channel(9), __dma_request_channel(9), dma_request_chan(9), dma_request_chan_by_mask(9), devm_dma_request_chan(9), dmaengine_get(9), dmaengine_put(9), dma_async_device_register(9), dma_async_device_unregister(9), dmaenginem_async_device_register(9), dma_wait_for_async_tx(9), dma_run_dependencies(9).
Catch you later, bestie π«Ά β this page comes from ./drivers/dma and is dated October 2026, still repping the min_chan(9) manual. Mwah π
π¦ 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