基础设施 4.0 · 优秀 2026-07-20 · 论文

SuperPass: Fast-Tracking Blocking Threads to Mitigate Priority Inversion on Mobile Devices

SuperPass 发现 Android 上的优先级反转长阻塞主要由低优先级线程的累积 CPU 等待时间造成,而非临界区延迟本身在 Pixel 8 上实测,内核 fast-track 调度让 UI 线程 P99.9 阻塞时长降 72.0%阻塞次数降 47.7%janky frames 降 29.2%,全系统 CPU 开销仅 0.74%优于 priority inheritancereal-time UI promotion 和 Proxy Execution 三种既有方案

打开原文回到归档

SuperPass: Fast-Tracking Blocking Threads to Mitigate Priority Inversion on Mobile Devices

  • 抓取时间: 2026-07-30

中文导读

SuperPass 发现 Android 上的优先级反转长阻塞主要由低优先级线程的累积 CPU 等待时间造成,而非临界区延迟本身。在 Pixel 8 上实测,内核 fast-track 调度让 UI 线程 P99.9 阻塞时长降 72.0%、阻塞次数降 47.7%、janky frames 降 29.2%,全系统 CPU 开销仅 0.74%。优于 priority inheritance、real-time UI promotion 和 Proxy Execution 三种既有方案。

为什么值得关注

掉帧根因可能在低优先级线程的累积等待而非临界区;内核 fast-track 调度降 jank 29%

English Abstract

Priority inversion occurs when a high-priority thread is delayed by a lower-priority one. Although well studied in real-time systems, its impact in general-purpose OSes (e.g., Android) remains underexplored. On Android, we find that priority inversions happen frequently and can delay latency-critical threads, degrading user experience. For example, the foreground app's UI thread is frequently blocked by low-priority threads, with blocking durations of up to 210 ms, enough to cause dropped frames. Existing solutions designed for real-time systems fail to eliminate long priority-inversion blockings on latency-critical threads and may introduce high overhead on Android. To solve this problem, we uncover two insights on Android: 1) long blockings are mainly due to the accumulated CPU waiting time of low-priority blocking threads rather than their critical-section latency; and 2) although latency-critical threads can be blocked by many concurrent readers, tracking a limited number of them is sufficient to achieve good responsiveness with low overhead in most cases. Guided by these insights, we propose SuperPass, a lightweight kernel mechanism that mitigates priority inversion by fast-track scheduling of low-priority threads blocking latency-critical threads. It introduces a scheduler fast track that grants immediate CPU access to threads blocking latency-critical threads, and employs a lock-level detector that effectively identifies most such blocking threads. We evaluate SuperPass on a Google Pixel 8 smartphone. Taking UI thread as a case study, SuperPass decreases the 99.9th-percentile blocking duration by 72.0% and blocking count by 47.7% on average compared to the default scheduler, and reduces janky frames by 29.2% with a system-wide CPU overhead of only 0.74%. SuperPass also outperforms existing approaches including priority inheritance, real-time UI promotion, and Proxy Execution.