Re: [PATCH 0/2] drivers: android: binder: Introduce Cluster Aware Thread Selection

From: Alice Ryhl

Date: Wed Jul 15 2026 - 05:27:01 EST


On Wed, Jul 15, 2026 at 03:35:50AM +0900, trieu2.huynh wrote:
> Motivation
> ----------
>
> On asymmetric multi-cluster ARM64 SoCs, the default binder thread
> selection is topology-blind. Cross-cluster thread wakeups incur severe
> cache-coherency overhead.
>
> Measured performance test [1], especially with schd-dbg tiered threads [2]
> on baseline (10K iter, 16B payload):
>
> Class Tier Avg Latency Count / % of txns
> ----- ---- ----------- -----------------
> SCHED_FIFO Same-core 0.089 ms 9,963 / 99.6%
> (max prio) Same-cluster 0.120 ms 13 / 0.1%
> Cross-cluster 0.140 ms 24 / 0.2%
> -----------------------------------------------------
> Normal Same-core 0.130 ms 4,623 / 46.2%
> (Other) Same-cluster 0.140 ms 3,290 / 32.9%
> Cross-cluster 0.190 ms 2,087 / 20.9%
>
> Key Observations:
> (*) For SCHED_FIFO tasks, the scheduler aggressively locks the affinity,
> keeping 99.6% of txns on the same core, establishing the hardware's
> ideal latency ceiling (~0.089 ms).
> (*) For normal tasks, selection is highly fragmented (only 46.2% on
> same-core). Cross-cluster transactions are ~46% slower (0.19 vs
> 0.13 ms) due to interconnect overhead and cache invalidation.
> (*) CTABS aims to close this gap for normal threads by enforcing affinity.

I've been told that GKI has patched wake_up_sync() to make it place the
recipient on the same CPU if nothing else is scheduled to run there.

* http://r.android.com/1362918
* http://r.android.com/1145589

Are these patches included in the tree from which you took this
benchmark?

Alice