Skip to content

tools/asahi: stop a timed-out host test's whole process group - #1901

Merged
DjDeveloperr merged 1 commit into
integration/aurorafrom
djdev/host-tests-kill-group
Nov 14, 2026
Merged

DjDeveloperr merged 1 commit into
integration/aurorafrom
djdev/host-tests-kill-group

Conversation

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Summary

  • run-host-tests.py ran each test with subprocess.run(timeout=...). On a timeout that kills only the test's own process. Its children (a compiler, or the git show of an old revision that several tests extract code from) were re-parented to init and kept running. On a loaded host each took up to 1.5 GB until it finished on its own, and every timed-out test left one behind.
  • Each test now starts in its own session. On a timeout, or when the run itself is interrupted, the runner kills the test's process group before collecting its output.
  • A test that finishes in time behaves exactly as before.

Testing

  • A stand-in job (sh -c 'sleep 300 & sleep 300', timeout 2 s) through the runner's run():
    • before: the job is reported exit timeout, and 1 background child is left running;
    • after: the same exit timeout report, and no child left.
  • Found on a busy host where the 900 s timeouts of the g15 growth and stats-drain tests left their git show children running for many minutes after each timeout.
  • The full suite runs through the changed runner in this PR's host-tests check.

🤖 Generated with Claude Code

run-host-tests.py ran each test with subprocess.run(timeout=...), which on
a timeout kills only the test's own process. Its children, such as a
compiler or a `git show` of an old revision that several tests extract
code from, were re-parented to init and kept running, using up to
1.5 GB each on a busy host until they finished on their own.

Start each test in its own session and, on a timeout or when the run is
interrupted, kill the test's process group before collecting its
output. A test that finishes is unaffected.

Signed-off-by: Diljit Singh <[email protected]>
@DjDeveloperr
DjDeveloperr merged commit 7c71d6d into integration/aurora Nov 14, 2026
1 check passed
@RyanTheTide
RyanTheTide deleted the djdev/host-tests-kill-group branch November 16, 2026 05:03
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 18, 2026
…ing GPU: describe it for the boot loader's handoff

The GPU driver has the M5 Ultra's configuration, but the J775D device
tree leaves the GPU and both GPU coprocessor nodes of the inventory
disabled, with no mailboxes and no reservations, so the Mac Studio boots
without a render node and its desktop session cannot start.

Add t6050-j775d-gpu.dtsi in the shape of dj's
t6050-j714s-gpu-panel.dtsi, commit 32a31cf ("arm64: dts: apple:
t6050-j714s: Describe the GPU and panel handoff"): the "gpu" alias, the
six reservations the boot loader fills, the two firmware mailboxes in
place of the inventory's coprocessor nodes, GPX and AFR held on, and the
GPU node's handoff properties. The J775D ADT gives the same addresses
and interrupts as J714s's: both firmware roles and their mailboxes are
on die 0. Two things differ from the J714s file:
- no panel or display part: the Studio's display chain is described
  already;
- the part's name, "apple,agx-g17d", with the "apple,agx-g17s" fallback
  the driver and the boot loader match.

The GPU part now reads much the same in four board files: the J714s,
J716c and K114c GPU files and this one. It could be one shared file
that they include; this leaves the others as they are.

Everything stays disabled in the source: the boot loader enables the
nodes after checking the ADT and the GPU firmware build. A loader that
does not know the Ultra's build leaves the GPU off, as today. Only
t6050-j775d.dts includes the new file.

Testing, on J775D, integration/aurora's head of 2026-11-14 (the merge
of aurora-silicon#1901) with this series, in six boots: one through aura main with the
loader's own pull request ("kboot: T6050: hand the M5 Ultra's GPU to
Linux instead of refusing its firmware build"), the kernel uploaded over
USB, and five through a boot loader that also hands over the display. In
each the loader reports the GPU enabled, the driver probes
2300000000.gpu with both firmware roles' initdata acknowledged, and a
render node appears, where integration's head has none; the compute and
chained-submit checks pass, 46 concurrent clients pass, and a 628-case
render CTS subset reads 571 pass and 57 not supported, with no GPU
recovery, fault or timeout in the kernel log. The ten other T6050 board
device trees (J714c, J714s, J716c, J716s, J775c, J873s, K114c, K114s,
K116c, K116s) and T8142's J704, J813 and J815 are byte-identical with
and without the series.

Signed-off-by: Jeff Queisser <[email protected]>
funkzy added a commit to funkzy/linux that referenced this pull request Nov 21, 2026
…ing GPU: describe it for the boot loader's handoff

The GPU driver has the M5 Ultra's configuration, but the J775D device
tree leaves the GPU and both GPU coprocessor nodes of the inventory
disabled, with no mailboxes and no reservations, so the Mac Studio boots
without a render node and its desktop session cannot start.

Add t6050-j775d-gpu.dtsi in the shape of dj's
t6050-j714s-gpu-panel.dtsi, commit 32a31cf ("arm64: dts: apple:
t6050-j714s: Describe the GPU and panel handoff"): the "gpu" alias, the
six reservations the boot loader fills, the two firmware mailboxes in
place of the inventory's coprocessor nodes, GPX and AFR held on, and the
GPU node's handoff properties. The J775D ADT gives the same addresses
and interrupts as J714s's: both firmware roles and their mailboxes are
on die 0. Two things differ from the J714s file:
- no panel or display part: the Studio's display chain is described
  already;
- the part's name, "apple,agx-g17d", with the "apple,agx-g17s" fallback
  the driver and the boot loader match.

The GPU part now reads much the same in four board files: the J714s,
J716c and K114c GPU files and this one. It could be one shared file
that they include; this leaves the others as they are.

Everything stays disabled in the source: the boot loader enables the
nodes after checking the ADT and the GPU firmware build. A loader that
does not know the Ultra's build leaves the GPU off, as today. Only
t6050-j775d.dts includes the new file.

Testing, on J775D, integration/aurora's head of 2026-11-14 (the merge
of aurora-silicon#1901) with this series, in six boots: one through aura main with the
loader's own pull request ("kboot: T6050: hand the M5 Ultra's GPU to
Linux instead of refusing its firmware build"), the kernel uploaded over
USB, and five through a boot loader that also hands over the display. In
each the loader reports the GPU enabled, the driver probes
2300000000.gpu with both firmware roles' initdata acknowledged, and a
render node appears, where integration's head has none; the compute and
chained-submit checks pass, 46 concurrent clients pass, and a 628-case
render CTS subset reads 571 pass and 57 not supported, with no GPU
recovery, fault or timeout in the kernel log. The ten other T6050 board
device trees (J714c, J714s, J716c, J716s, J775c, J873s, K114c, K114s,
K116c, K116s) and T8142's J704, J813 and J815 are byte-identical with
and without the series.

Signed-off-by: Jeff Queisser <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant