跳到主要內容

發表文章

目前顯示的是有「Latency」標籤的文章

從 EEVDF 看 Linux 核心對端側 AI 延遲敏感度的排程配額優化 / Optimizing Edge AI Latency via Linux EEVDF: Scheduling Quotas and Virtual Deadlines

daily-tech:2026-11-26 從 EEVDF 看 Linux 核心對端側 AI 延遲敏感度的排程配額優化 / Optimizing Edge AI Latency via Linux EEVDF: Scheduling Quotas and Virtual Deadlines 現象: 在 Linux 與 Android 邊緣裝置上部屬端側 AI(例如即時語音辨識、手勢追蹤或端側小型語言模型 SLM Token 生成)時,許多開發團隊在處理高負載背景任務時,常發現 AI 推論會出現不可預期的延遲抖動(Latency Jitter)。即便系統已經透過前篇討論的 DMA-BUF 零拷貝技術消除了大部分的記憶體搬移開銷,但當 AI 執行緒被硬體中斷(如相機新圖框就緒、麥克風音訊緩衝區填滿)喚醒時,往往無法第一時間搶佔 CPU 核心,而是在就緒佇列(Runqueue)中痛苦排隊 5 到 15 毫秒。這類延遲使得即時互動系統的影音同步失效,嚴重傷害端側 AI 的流暢體驗。 Symptom: When deploying on-device AI workloads (such as real-time keyword spotting, gesture tracking, or edge small language model SLM token streaming) on Linux and Android devices under concurrent system loads, developers frequently encounter severe latency jitter. Even after eliminating redundant memory copies using the DMA-BUF zero-copy pipeline analyzed in our previous article, AI threads awakened by hardware interrupts (e.g., camera frame completions or audio buffer fills) often fail to seize CPU cores immediately. Instead, they languish in run...