Honor MUSCHED: eBPF VIP Scheduling Cuts Mobile Touch Latency 31% and Frame Drops 92%
Honor's MUSCHED introduces a VIP scheduling class between real-time and CFS via eBPF's sched-ext, using scenario-aware thread annotation and cross-process priority propagation to reduce touch-to-display latency by 31% and eliminate 92% of frame drops on 120Hz mobile devices.
Modern mobile devices face an "impossible trinity": ultra-tight frame deadlines (8.3 ms at 120 Hz), bursty interactive workloads, and traditional Linux schedulers that are either too aggressive (RT) or too generic (CFS/EEVDF). Honor's MUSCHED, presented at Chinasys 2026, addresses this with a semantic-aware scheduler built on sched_ext eBPF.
Core Innovations
VIP scheduling class : A new priority tier between RT and CFS, using FIFO ordering with a 3 ms time slice and per-task quota limits (WebView 120 ms, audio 20 ms, video 10 ms, display 20 ms). Tasks exceeding both slice and quota are temporarily demoted.
Scenario-aware annotation : Function hooks in Android framework (SystemUI, launcher animations, focus changes, frame rendering) dynamically tag critical threads (Animator, UI, Render, WebView Loading) as VIP when they move to foreground.
Cross-process priority propagation : For Binder IPC and lock dependencies, VIP tags propagate to remote service threads (e.g., SurfaceFlinger) and lock holders, eliminating long-tail latency. Tags are cleared after IPC completion or lock release.
Scheduling Mechanisms
CPU Selection
On wake-up, VIP tasks prefer idle performance cores; if none, the least-loaded performance core without RT/VIP tasks; finally, a core with no RT tasks and fewest VIP tasks.
Load Balancing
Pull : Idle CPUs steal the first runnable VIP task from queues containing both RT and VIP tasks, or from the queue with most VIP tasks.
Push : On each tick, if a VIP task has waited >4 ms while an RT task runs, migrate it to a core with no RT tasks and fewest VIP tasks.
Lock Wait Optimization
VIP preemption : VIP threads break FIFO wake-up order, jumping ahead of non-critical waiters.
VIP inheritance : When a VIP thread blocks on a lock held by a normal thread, the holder temporarily inherits the VIP tag to accelerate unlock; tag is cleared on wake-up.
Implementation via sched_ext
sched_select_cpu: Chooses target core for VIP tasks. sched_enqueue / sched_dispatch: Places tasks into per-CPU VIP DSQs via scx_bpf_dispatch to PRIO-DSQ.
Load balancing uses scx_bpf_consume(DSQ_ID_VIP) for local consumption and stealing from neighbor VIP DSQs.
State tracked via two BPF maps: cpu_contexts ( BPF_MAP_TYPE_PERCPU_ARRAY): per-CPU idle time, load, queued task count, suspend state. task_contexts ( BPF_MAP_TYPE_TASK_STORAGE): per-task weight, execution state, compute load, enqueue/dequeue timestamps.
Evaluation Results
On Snapdragon 8 Gen 4 + Android 15 flagship hardware:
Touch-to-display latency reduced up to 31% .
92% of frame drops eliminated at 120 Hz.
Cold-start case study on Honor Magic 7 (10 popular apps): 300+ threads created, hundreds of MB to GB memory allocated, intense CPU contention. MUSCHED reduced cold-start time, D-state (uninterruptible sleep) and Runnable-state durations significantly (see charts).
Production deployment across >20 million devices shows measurable reductions in abnormal latency for animation, swipe, and startup scenarios.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Thought Artisan
I think, therefore I am; recording insights from daily life and technology.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
