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...
從 DMA-BUF 到 AHardwareBuffer:拆解 Android 與 Linux 端側 AI 零拷貝管線 / From DMA-BUF to AHardwareBuffer: Deconstructing Zero-Copy Pipelines in Android and Linux Edge AI
daily-tech:2026-11-25 從 DMA-BUF 到 AHardwareBuffer:拆解 Android 與 Linux 端側 AI 零拷貝管線 / From DMA-BUF to AHardwareBuffer: Deconstructing Zero-Copy Pipelines in Android and Linux Edge AI 現象: 在智慧型手機或邊緣嵌入式裝置上執行即時影像 AI(例如物件偵測、語意分割或姿態辨識)時,許多團隊常遇到一種難堪的效能瓶頸:明明選用了輕量化的量化神經網路,推論核心花費的時間僅需 15 毫秒,然而整體管線的端到端延遲卻高達 45 毫秒以上,甚至伴隨著 CPU 使用率飆高與手機發燙。深入分析效能剖析數據後會發現,推論本身很快,耗時全卡在「相機取像後把點陣圖複製給 GPU 前處理」、「GPU 處理完再拷貝成張量陣列交給 NPU」這兩次不必要的記憶體搬移上。 Symptom: When deploying real-time vision AI (such as object detection, semantic segmentation, or pose estimation) on smartphones or edge embedded devices, engineering teams often face an unexpected performance bottleneck: despite choosing an ultra-lightweight quantized neural network whose core inference takes only 15 milliseconds, the end-to-end pipeline latency exceeds 45 milliseconds, accompanied by soaring CPU utilization and device throttling. Profiling reveals that raw inference is swift; the real culprits are redundant memory copies between camera ISP buffers, GPU preproces...