Repository navigation
arm64: dts: apple: t6050: Give the M and P cores their capacities - #1399
Merged
Merged
Conversation
The T6050 Max CPU nodes had no cpu-map, so Linux sees eighteen CPUs in one package with no clusters. parse_dt_topology() also reads each CPU's capacity-dmips-mhz only while it walks cpu-map, so without one no capacity reaches the scheduler. Describe the three clusters as the ADT does: MPIDR Aff1 0 and 1 are the M clusters, 2 the P cluster, each with its own L2. The boot loader prunes the entries of cores it did not start. The two-die description keeps its flat layout for now. Signed-off-by: Diljit Singh <[email protected]>
Without capacity-dmips-mhz every T6050 CPU reports a capacity of 1024, so the scheduler treats the six P cores (apple,everest, CPUs 12-17) like the twelve M cores and an unpinned single heavy thread lands on an M core most of the time (4 of 5 runs on J714sAP). Measured on J714sAP with every cluster pinned to 4284 MHz, which both OPP tables have, and each core's clock read with a dependent-add chain: per MHz an M core runs zstd -3 compression at 0.736, decompression at 0.871 and a Python dict loop at 0.728 of a P core (geometric mean 0.776). Small L1-resident integer, branch, sort, hash and FP loops run at 0.92-1.01, which shows the execution units match but not how general code runs. So M 794 and P 1024; with the 4380 and 4608 MHz tops the M cores' capacity is 754. The values take effect through the cpu-map the previous commit adds. Signed-off-by: Diljit Singh <[email protected]>
DjDeveloperr
marked this pull request as ready for review
November 10, 2026 00:54
Contributor
Author
|
Merging: validated on the M5 Pro (J714sAP), CI green (dt-checks, host-tests). Hardware evidence (2026-11-09). Run capb2 compared the default SSD boot,
🤖 Generated with Claude Code |
This was referenced Nov 11, 2026
Merged
funkzy
added a commit
to funkzy/linux
that referenced
this pull request
Nov 18, 2026
…2s, for up to 1.5x faster and steadier light GPU submits on M5 Ultra The M5 Ultra's CPU nodes have no cpu-map and name no cache, so Linux sees thirty CPUs in one package with no clusters, and one L2 shared by all thirty. Two things follow on the J775D (Mac Studio): - parse_dt_topology() reads capacity-dmips-mhz only while it walks cpu-map, so the M and P core capacities that t6050-base.dtsi gives every T6050 CPU (dj's aurora-silicon#1399) never reach the scheduler: every CPU reports cpu_capacity 1024. - With no last-level cache to group the CPUs by, the scheduler's cache-sharing domain is the whole package: a wakeup may pick any idle CPU of the thirty, on either die. Describe the six clusters the way the one-die description does, commit 68c10dd ("arm64: dts: apple: t6050: Describe the CPU clusters"): MPIDR Aff1 0, 1 and 2 are die 0's M0, M1 and P clusters and 0x10, 0x11 and 0x12 are die 1's, five cores each, as the ADT's cluster-id and die-id give them. The clusters are listed flat, cluster0-2 on die 0 and cluster3-5 on die 1, as the M1 and M2 Ultra descriptions (t6002.dtsi, t6022.dtsi) list theirs; the topology parser does not support clusters of clusters. The boot loader prunes the entries of cores it did not start. The capacities in t6050-base.dtsi are kept as they are. Add one L2 cache node per cluster and point each CPU's next-level-cache at its cluster's: the ADT gives each CPU an l2-cache-size of 8 MiB in the M clusters and 16 MiB in the P clusters. It gives no L1 sizes and no L2 geometry, so the nodes carry the level and the size only. They sit in /cpus as l2-cache-N, as in t6002.dtsi and t6022.dtsi. Both are in one commit because the gain needs both. With the cpu-map alone the clusters and capacities appear, but every CPU still reports its L2 as shared by all thirty, and the rows below read as without it (18.4-23.0 us at depth 8, on integration's head of 2026-11-10). Only t6050-j775d.dts includes t6050-ultra.dtsi, so the J775D is the only board whose device tree changes: the ten other T6050 board device trees (J714c, J714s, J716c, J716s, J775c, J873s, K114c, K114s, K116c, K116s) are byte-identical with and without the series. The one-die description (t6050-max.dtsi) has a cpu-map and no cache nodes; this commit leaves it unchanged. Testing, on J775D, integration/aurora's head of 2026-11-14 (the merge of aurora-silicon#1901) with the J775D GPU described (its own pull request), two boots with and two without this commit, three passes of each row a boot: - cpu_capacity reads 754 on the twenty M cores and 1024 on the ten P cores (1024 on all thirty without); cluster_cpus_list reads six lists of five (thirty lists of one without); each CPU's L2 reads 8 MiB or 16 MiB shared by its own five (no size, shared by all thirty, without). - A light compute submit with 8 in flight takes 16.8-17.6 us against 20.1-23.5, and with 64 in flight 13.7-14.5 us against 16.1-24.0. A 720p fill with 4 in flight takes 43.3-45.4 us against 50.5-70.3. By the median of the six passes these are 1.31x, 1.52x and 1.40x. A single-triangle render with 8 in flight takes 31.9-32.5 us against 30.9-37.6, and with 32 in flight 29.1-29.9 us against 28.2-38.0: steadier rather than faster. Single submits and the heavy compute rows are unchanged, and a semaphore hop between two queues takes 42.3-46.5 us against 45.0-49.1. - The GPU's compute and chained-submit checks, 46 concurrent clients and a 628-case render CTS subset (571 pass, 57 not supported) read the same either way, with no GPU recovery, fault or timeout in the kernel log. Signed-off-by: Jeff Queisser <[email protected]>
funkzy
added a commit
to funkzy/linux
that referenced
this pull request
Nov 21, 2026
…eduler gets the M5 Ultra's M and P core capacities (754 and 1024, not 1024 on all thirty) The M5 Ultra's CPU nodes have no cpu-map, so Linux sees thirty CPUs in one package with no clusters. parse_dt_topology() reads capacity-dmips-mhz only while it walks cpu-map, so the M and P core capacities that t6050-base.dtsi gives every T6050 CPU (dj's aurora-silicon#1399) never reach the scheduler: on the J775D (Mac Studio) every CPU reports cpu_capacity 1024, and cluster_cpus_list reads thirty clusters of one. Describe the six clusters the way the one-die description does, commit 68c10dd ("arm64: dts: apple: t6050: Describe the CPU clusters"): MPIDR Aff1 0, 1 and 2 are die 0's M0, M1 and P clusters and 0x10, 0x11 and 0x12 are die 1's, five cores each, as the ADT's cluster-id and die-id give them. The clusters are listed flat, cluster0-2 on die 0 and cluster3-5 on die 1, as the M1 and M2 Ultra descriptions (t6002.dtsi, t6022.dtsi) list theirs; the topology parser does not support clusters of clusters. The boot loader prunes the entries of cores it did not start. The capacities in t6050-base.dtsi are kept as they are. The caches are described already: dj's commit 1bd5f40 ("arm64: dts: apple: t6050: Describe the CPU caches") gives each cluster its L2 and points each CPU's next-level-cache at it, and each cluster here is the set of CPUs that share one of those L2s. Only t6050-j775d.dts includes t6050-ultra.dtsi, so the J775D is the only board whose device tree changes: the ten other T6050 board device trees (J714c, J714s, J716c, J716s, J775c, J873s, K114c, K114s, K116c, K116s) are byte-identical with and without the series. The one-die description (t6050-max.dtsi) has its cpu-map already; this commit leaves it unchanged. Testing, on J775D, integration/aurora's head of 2026-11-21 (a84637d, the merge of aurora-silicon#2654), one boot with and one without the series, both with a local display fix that is not part of it: cpu_capacity reads 754 on the twenty M cores and 1024 on the ten P cores (1024 on all thirty without), and cluster_cpus_list reads six lists of five (thirty lists of one without). Each CPU's L2 reads the same either way: 8 MiB or 16 MiB, shared by its own cluster's five. Signed-off-by: Jeff Queisser <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On the M5 Pro (J714s) every CPU reports
cpu_capacity1024, so the scheduler can't tell the six P cores (apple,everest, CPUs 12-17) from the twelve M cores (apple,sawtooth). An unpinned single heavy thread lands on an M core most of the time (4 of 5 runs), and CPU-bound GPU benchmarks swing 16-33 % between runs, depending on which cluster the submitting thread lands on.Two commits:
arm64: dts: apple: t6050: Describe the CPU clusters: acpu-mapfor the T6050 Max (one die): clusters 0 and 1 are the M clusters (MPIDR Aff1 0, 1) and cluster 2 is the P cluster, each with its own L2 (ADTl2-cache-id,cluster-type).parse_dt_topology()readscapacity-dmips-mhzonly while it walkscpu-map, so without one no capacity reaches the scheduler. A first test with the capacities alone left every CPU at 1024, which is how this showed up. The boot loader prunescpu-mapentries of cores it didn't start. The two-die description (t6050-ultra.dtsi) keeps its flat layout; I couldn't test it here.arm64: dts: apple: t6050: Give the M and P cores their capacities: M 794, P 1024.How the values were measured (J714sAP, 7.3.0-m5-argb)
Pinned single-thread throughput with every cluster at 4284 MHz, which both OPP tables have. Each core's clock comes from a dependent-add chain (M0 4.336, M1 4.285, P 4.272 GHz), and rates are divided by it:
capacity-dmips-mhzThe small loops show that both cores have the same execution resources for simple code, but they don't tell how general code runs, so the value comes from the three real workloads. With the 4380 MHz (M) and 4608 MHz (P) tops, the M cores' capacity is 1024 × 794 × 4380 / (1024 × 4608) = 754.
Results on the M5
Default SSD boot (
7.3.0-m5-argb) against the same kernel with only this DTB, installed over SSH in one session (run capb2, 2026-11-09 19:38-19:48), then rolled back:cluster_id0, 1, 2).The single-threaded submit paths now stay on P cores, and their unpinned spread falls to the pinned level. The GPU-bound test doesn't change. compute.light is multi-threaded and noisy even when pinned, and part of it still runs on M cores; its unpinned spread doesn't drop.
currentis7.3.0-m5-argbagain.Energy model
Not added.
apple-soc-cpufreqregisters one only from OPP power data (opp-microwattor a power coefficient), and the T6050 tables have none. I measured one busy core's SMC total-system-power increase at every OPP (idle about 7.0 W with the desktop running):So EAS would mostly choose the same cores the capacities already lead to. With single samples of whole-system power, the data doesn't justify an energy model yet.
Testing
🤖 Generated with Claude Code