Skip to content

drm/asahi: g17: bound submit syncs, install repeated timeline outputs once, return closed queues' identities at close - #3200

Open
DjDeveloperr wants to merge 13 commits into
mainfrom
fix/g17-submit-syncs-and-closed-queues
Open

DjDeveloperr wants to merge 13 commits into
mainfrom
fix/g17-submit-syncs-and-closed-queues

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

What: Three fixes on the G17 submit and queue-close paths. A SUBMIT's syncs get the bound G15 and G16 already apply, checked before they are parsed. Timeline outputs of one submission that name the same syncobj are installed once, at their highest point, instead of once each. A closed queue whose context the firmware never saw returns that context's execution identity, QoS ID and unused render identity at close, instead of when its last cancelled job is freed.

Tested: J700 MacBook Neo and J714s M5 Pro passed at 0c4976b9ffb5 with the same candidate driver tree 57b238b01260 on base driver 35ddf947b124. J700 results.

On J714s, both in-tree modules used the same 7.3.0-main571a6c45 Image. All 146,688 Vulkan synchronization CTS outcomes matched across the two arms (86,687 pass, 59,993 unsupported, 8 quality warnings). Median duplicate-output submit time at 4,096 outputs fell from 56.13 ms to 152.2 µs. Timeline 9, binary, timeline 7 still ended at 7, and the 4,097-output request left the candidate sync point unchanged. All 60 killed clients were reaped, the candidate held zero execution and QoS identities after each kill round, and the final client passed 322/322 cases. Kernel logs contained only the expected duplicate-output refusals. Stock 7.3.0-m5-pr67 restored. The candidate arm64 driver built with KUnit enabled, and the focused G17 host suite on the hardware integration passed 406/406.

At fc20d119f279 against 6d2373cf0609, J714s released all 12 unpublished contexts and QoS IDs immediately on close, retained published contexts until the firmware acknowledgement, passed compute and render smoke with zero GPU/MMU faults, and returned to stock. Matched J714s receipt.

Risk: two-way door · every Mac for the output merge (shared file.rs sync parsing); A18 Pro and M5 for the sync bound and the close path.

Details

Not yet: Refreshed J700 sync, render/compute, and queue-close compatibility on current main with #3242 in both arms.

1. drm/asahi: g17: bound a submission's syncs before parsing them

The ioctl parses every input and output sync before the queue sees the submission. Each becomes a parsed record holding a syncobj and fence reference, and each timeline output also gets a chain node that its syncobj keeps once the output is installed. G17 had no bound on how many. G15 and G16 refuse more than 4096 in total, but only in their queues, after parsing.

The bound moves to file.rs as MAX_SYNCS_PER_SUBMISSION, which G15 and G16 now name; their behaviour is unchanged. A new Gpu::max_syncs() admission bound is checked next to max_cmdbuf_size(), before anything is copied or allocated. G17 returns the shared bound, so userspace that submits on G15 and G16 submits the same way on G17. Other generations keep returning no bound.

2. drm/asahi: install a submission's timeline outputs on one syncobj once

Every output of a submission gets the same fence. drm_syncobj_add_point() walks the syncobj's chain after each installation, one node per step while the fence it holds is unsignalled, and each installation adds a node. N outputs naming one timeline syncobj therefore cost N(N+1)/2 chain steps under the queue lock. G17 installs outputs both when it accepts a submission and when it refuses one after resolving its outputs, so an empty command stream is enough.

This isn't only a malformed-input case. Mesa's Vulkan runtime merges a signal-only batch into the batch before it, so one submission can signal a timeline at two rising points.

The parser now merges them before any chain node is allocated. It keeps the last output of each timeline syncobj, raised to the highest of that syncobj's points. Waits don't change: dma_fence_chain_find_seqno() resolves any of the merged points to that one node, whose fence is the submission's, and the syncobj's last submitted point is the same. Binary outputs are left alone, and one that names the same syncobj ends a merge: it replaces the chain, so timeline 9, binary, timeline 7 still ends at 7. The cumulative anchor never merges, so an output aliasing it is still refused. The merge sorts the outputs, and allocates only when there are at least two timeline outputs.

This sits in shared file.rs, so every generation's submissions get it. It changes nothing a waiter can observe.

3. drm/asahi: g17: return a closed queue's unpublished identities at close

A context holds an execution identity, a QoS ID and, on some variants, a render identity, all from small device-wide pools. If the firmware saw the context, closing the queue arms a scheduler release, and the identities return once the firmware has consumed it. If it never saw the context, teardown::Pending::close() keeps nothing, and the identities return only with the context's last reference.

That reference can outlive the queue for as long as userspace likes. When a client exits, its scheduler entities cancel the jobs still waiting for an input fence. drm_sched frees such a job only after every one of its dependencies has signalled (drm_sched_entity_kill_jobs_work()), and the job holds the queue's backend, and through it the context. The queue's admission slot and its process's queue share, though, are returned at close. So each exiting client with such a job leaves an execution identity in use that no open queue accounts for. On M5, where every queue has its own, enough of them leave a new queue waiting for contexts that aren't actually closing, until it fails with ENOSPC.

Once both schedulers are torn down, nothing of the queue can be published, so the firmware can never see that context. release_queue() now returns its execution identity (through the shared-context bookkeeping on A18 Pro), its QoS ID and its unused render identity right there, next to the queue's admission. The cancelled jobs keep only memory, and still signal their outputs after their inputs, as drm_sched requires. QosLease gives its ID back exactly once, either early or on drop. A published context is unchanged: its identities still wait for the consumed release.

Merging with #3021

#3021 turns the sync list into a KVVec. Whichever of the two lands second needs coalesce_outputs() to take the other's vector type; the logic doesn't change.

Evidence
  • Build: ./linux-build/build kernel --profile asahi <tree> -- drivers/gpu/drm/asahi/ at 43f3740cfbd05, exit 0. No warning in a changed line.
  • checkpatch --strict: 0/0/0 on all three commits.
  • New KUnit cases: asahi_submit_outputs (distinct syncobjs untouched; rising and falling points keep the last output at the highest point; 4096 repeats of one point leave one output) and asahi_g17_qos_capacity::an_id_given_back_early_is_given_back_once.
  • Hardware tests for the rows (run as root, headless):
    • dup-outputs: raw ioctls with no GPU work. It names one timeline syncobj from 1024, 2048 and 4096 outputs, then rising points 1 to 4096, then 4097 syncs. It expects time to grow about linearly, every point to be waitable, and 4097 to be refused with nothing installed, and timeline 9, binary, timeline 7 on one syncobj to end at 7.
    • killed-jobs: twelve clients each submit a fill behind a chain of bounded compute dispatches (8 × ~0.8 s, each inside the 2 s watchdog) and are SIGKILLed while the chain runs. It compares /sys/kernel/debug/aurora-g17/capacity after the kills against after the chain finished. Expected: no execution contexts or QoS IDs held by the killed jobs.
    • Stress: 60 deqp-vk sync clients SIGKILLed at random points, three killed-jobs rounds, then a kernel log check.

A SUBMIT names its input and output syncs by count and pointer, and the
ioctl parses every one of them before the queue sees the submission:
each becomes a parsed record holding a syncobj and fence reference, and
each timeline output a chain node its syncobj keeps once installed.
G17 put no bound on their number. G15 and G16 refuse more than 4096 in
total, but only in their queues, after parsing.

Move that bound to file.rs as MAX_SYNCS_PER_SUBMISSION, which G15 and
G16 now name, and give the GPU trait a max_syncs() admission bound that
the ioctl checks next to max_cmdbuf_size(), before anything is copied
or allocated. G17 returns the shared bound, so userspace that submits
on G15 and G16 submits the same way on G17. Other generations keep
their current behaviour.

Signed-off-by: Dj <43033058+DjDeveloperr@users.noreply.github.com>
Every output of a submission receives the same fence. Installing a
timeline point, drm_syncobj_add_point() walks the syncobj's chain for
garbage collection, one node per step while the fence it holds is
unsignalled, and each installation adds a node. N outputs that name one
timeline syncobj therefore cost N(N+1)/2 chain steps under the queue
lock, and keep N chain nodes on the syncobj. G17 installs its outputs
both when it accepts a submission and when it refuses one after
resolving them, so an empty command stream is enough.

Such submissions are not only malformed ones: the Vulkan runtime merges
a signal-only batch into the batch before it, so one submission can
signal a timeline at two rising points.

Merge those outputs before any chain node is allocated: keep the last
output of each timeline syncobj, at the highest of its points. Waits are
unchanged: dma_fence_chain_find_seqno() resolves any of the merged
points to the one node, whose fence is the submission's, and the
syncobj's last submitted point is the same. Binary outputs are left as
they are, and the cumulative anchor never merges, so an output aliasing
it is still refused. The merge sorts the outputs that can merge, and
allocates only when a submission has two or more of them.

KUnit: asahi_submit_outputs.

Signed-off-by: Dj <43033058+DjDeveloperr@users.noreply.github.com>
A queue's context holds an execution identity, a QoS ID and, on some
variants, a render identity, all from small device-wide pools. If the
firmware saw the context, closing the queue arms a scheduler release,
and the identities return when the firmware has consumed it. If it never
saw the context, teardown::Pending::close() keeps nothing, and the
identities return only with the context's last reference.

That reference can outlive the queue by as long as userspace likes.
When a client exits, its scheduler entities cancel the jobs still
waiting for an input fence, but drm_sched frees such a job only once
every one of its dependencies has signalled
(drm_sched_entity_kill_jobs_work()), and the job holds the queue's
backend and so its context. Meanwhile the queue's admission slot and
its process's queue share are returned at close. Each exiting client
with such a job then leaves an execution identity in use that no open
queue accounts for. On M5, where every queue has its own, enough of
them leave a new queue waiting for contexts that are not closing, and
it fails with ENOSPC.

Once both schedulers are torn down nothing of the queue can be
published any more, so the firmware can never see that context: return
its execution identity, QoS ID and unused render identity at close,
next to the queue's admission. The cancelled jobs keep only memory, and
still signal their outputs after their inputs, as drm_sched requires.
QosLease now gives its ID back once, early or on drop.

KUnit: asahi_g17_qos_capacity (an_id_given_back_early_is_given_back_once).

Signed-off-by: Dj <43033058+DjDeveloperr@users.noreply.github.com>
@DjDeveloperr
DjDeveloperr requested review from a team as code owners November 26, 2026 06:59
@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) blast:all Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Merge readiness at fc20d119: not ready yet

Check Detail
CI at head running running: apple-build, host-tests, KUnit plan
Review ok approved by RyanTheTide
Requested changes ok none
Hardware row at head ok the PR body at fc20d119
Conflicts ok none
PR text ok Risk: two-way · every Mac for the output merge (shared file.rs sync parsing); A18 Pro and M5 for the sync bound and the close path.

Areas: area:gpu

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@DjDeveloperr

DjDeveloperr commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Verdict at b04ba72e86ee: ready

Blockers: none

At 43f3740cfbd0 two host-test stand-ins did not build: the release_queue() fixture in g17-admission-order-tests.py and the mod file of asahi-m4/test-command-stream.py. The new commit b04ba72e86ee is test-only. It gives the stand-in Context a no-op release_unpublished() and the stand-in file module MAX_SYNCS_PER_SUBMISSION, and touches no driver file. host-tests is green at this head.

Checked:

  • Sync bound: in_sync_count + out_sync_count is summed as usize from two u32s, so it cannot wrap. It is checked before parse_array() copies or allocates anything. Only G17 returns a bound. G15 and G16 keep their refusal in the queue, so for them nothing changes.
  • Output merge: the chain nodes are allocated after coalesce_outputs(), so a merged-away output never gets one. Inputs, binary outputs and the cumulative anchor are left alone. The anchor index is shifted by the number of merged outputs before it. retain() walks the sorted merged list once. Keeping the last output at the highest point gives the syncobj the same last point, and dma_fence_chain_find_seqno() resolves any merged point to that one node. The four KUnit cases cover distinct syncobjs, rising points, falling points and 4096 repeats.
  • Early release at close:
    • It runs only when teardown.close() kept nothing, after both entities and the compute and render owners are released, and it checks is_published() again.
    • Execution release is already once-only (ExecutionRoot::released, exec_share::Use::done). QosLease::give_back() is now once-only too, and the new KUnit case shows that dropping the early holder does not free the ID's new owner.
    • A context bound to a compute graph is marked published at bind, so retain_firmware_pages(), which keeps a QosLease, never sees one that was released early.
  • Merged-code rules: no runtime switch and no SoC or board gate. The 4096 is the existing G15/G16 value, now named once in the driver. The asahi-m4 stand-in repeats it, as that fixture already does for MAX_COMMANDS_PER_SUBMISSION.
  • Not blocking: G15 and G16 still parse every sync before their queue refuses more than 4096. Returning the same max_syncs() there would refuse them before any record is built, with the same result for userspace.
Evidence
  • git diff 43f3740cfbd0 b04ba72e86ee: only tools/asahi/g17-admission-order-tests.py (+2) and tools/testing/selftests/drivers/gpu/asahi-m4/test-command-stream.py (+1/-1).
  • CI at b04ba72e86ee: host-tests success, apple-build success.
  • Build at 43f3740cfbd0 with the asahi profile (LLVM, Rust): rust/ and drivers/gpu/drm/asahi/, exit 0, no warning on a changed line. The driver code is unchanged since then.
  • CI KUnit asahi at 43f3740cfbd0: 468 run, 464 pass, 4 skipped. asahi_submit_outputs passes 4/4 and asahi_g17_qos_capacity passes, including an_id_given_back_early_is_given_back_once.
  • The hardware rows (J700, J714s) are still listed under "Not yet".

@DjDeveloperr

DjDeveloperr commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Update, J773g (M4 Mac mini, G16G) at b04ba72e86ee: PASS, no regression found. The rerun with one worker and no cross_instance groups ran clean on both kernels: 0 GPU faults, 0 recoveries, and no fail-stop. Since 43f3740cfbd0, only two test scripts changed (tools/asahi/g17-admission-order-tests.py and the asahi-m4 command-stream selftest), so the kernel code is the same.

How it was run: two guarded one-shots on the default cmdline, the same day on the same Mac.

CTS: dEQP-VK.synchronization* minus multi_queue (#3201) and minus cross_instance, every 4th case (11,834 including api.smoke), one worker.

control (main) candidate (main + this PR)
result 11,834 recorded in 221 s: 9,156 pass, 2,677 not supported, 1 fail 11,834 recorded in 220 s: 9,154 pass, 2,677 not supported, 3 fail
GPU recoveries / hang kills 0 / 0 0 / 0
gpubench sync.signal d1 164.3 µs 166.7 µs
gpubench compute.light d1 / d4 114.4 / 46.7 µs 111.3 / 46.2 µs

All four fails are different cases from the same op.single_queue family: an SSBO written by compute or fragment and read by a geometry or vertex stage.

  • control: synchronization.op.single_queue.fence.write_ssbo_compute_indirect_read_ubo_texel_vertex.buffer_16384
  • candidate: synchronization2.op.single_queue.event.write_ssbo_compute_read_ssbo_geometry.buffer_262144_maintenance9, ….fence.write_ssbo_fragment_read_ssbo_geometry.buffer_262144_specialized_access_flag and ….timeline_semaphore.write_ssbo_compute_indirect_read_ubo_texel_vertex.buffer_16384_specialized_access_flag

None of them fails on its own: all four ran 25 times each on the stock kernel, 100/100 pass, with no kernel lines. I read them as the same flaky family on both arms, not something this PR adds. I didn't repeat them on the candidate kernel.

Other checks: api.smoke 8/8 on both. 0 GPU fault/IRQ error lines, 0 WARNING: lines and 0 failed units on both.

Not run: the cross_instance groups. They fault on main (#3201), so they can't tell anything about this PR on the J773g.

Both boots returned to the stock kernel, and the kits were removed from the Mac.


Earlier run, at 43f3740cfbd0:

J773g (M4 Mac mini, G16G) at 43f3740cfbd0: not a pass yet. The candidate's GPU fail-stopped during the sync CTS. Main faults on the same cases, so a single run can't pin it on this PR. A cleaner A/B follows in my next hold.

How it was run: two guarded one-shots on the default cmdline.

CTS: dEQP-VK.synchronization* with the multi_queue cases of #3201 excluded, every 4th case (27,487), plus api.smoke, with 3 parallel workers.

control (main) candidate (main + this PR)
result all 27,487 recorded: 14,138 pass, 13,317 not supported, 32 fail stopped at 19,886: 7,845 pass, 11,747 not supported, 292 fail, 1 crash, 1 device lost
GPU recoveries 2, then the run finished (514 s) 4, then "administrative command deadline exceeded … fail-stop (ETIMEDOUT)" at 156 s

Both boots lost the device on the same early case, synchronization.cross_instance.dedicated.write_image_vertex_read_blit_image.image_128x128_r16_uint_timeline_semaphore_dma_buf. They show the same fault signature: all 8 fault banks read unmapped level 1 unit 0x1 at va 0x0–0x380.

  • On main the driver recovered twice and went on.
  • On the candidate it recovered 4 times and then fail-stopped. The extra fails are almost all cross_instance cases lost around those recoveries (173 suballocated, 105 dedicated).

So these faults come from the base, the cross-instance external-semaphore tests, as in #3201. Whether this PR makes them escalate can't be told from one run per arm.

Other checks:

  • api.smoke: 8/8 on both, before the CTS.
  • gpubench sync.signal and compute.light: control ok (sync.signal d1 164.2 µs, compute.light d1 113.7 / d4 46.5). On the candidate they couldn't run after the fail-stop.
  • 0 DART/IOMMU faults and 0 WARNING: lines on both.

Not yet: the same subset on both kernels with one worker and without the cross_instance groups, which fault on main. After that, the cross_instance groups on their own, run several times per arm. That's in my next hold.

…d the sync bound

Two host tests compile driver files against stand-ins that lacked what
this branch's earlier commits use. g17-admission-order-tests.py builds
release_queue(), which now calls Context::release_unpublished(); its
stand-in Context gets it as a no-op, since the fixture models slot holds,
not identities. test-command-stream.py builds g16/command.rs, whose
MAX_SYNCS now names file::MAX_SYNCS_PER_SUBMISSION; its stand-in file
module gets the constant.

No runtime code changes.

Signed-off-by: DjDeveloperr <hey@djdev.me>
Keep main's execution_share_id() and this branch's release_unpublished()
next to each other in g17/context.rs. release_unpublished() releases the
execution identity through release_execution(), which on main goes
through the exec_share Use: a shared context only leaves its share, and
the last sharer releases the root.

Signed-off-by: DjDeveloperr <hey@djdev.me>
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Merged main (18edb08ad329) into this branch as fa5571a77bab, with a normal merge commit and no force push. The only conflict was in g17/context.rs, where main's new execution_share_id() and this branch's release_unpublished() were added at the same place. Both are kept. release_unpublished() calls release_execution(), which on main goes through the exec_share Use. That Use is idempotent (done flag), so a shared context only leaves its share and the last sharer releases the root. The other nine PR files merged cleanly, and the diff against main is the same 10 files.

Checks on fa5571a77bab (pc, defconfig + asahi.config, LLVM, layout-corrected bindgen):

  • modules_prepare drivers/gpu/drm/asahi/ built and linked asahi_core.o and aurora.o. The only Rust warnings are in files this PR doesn't touch.
  • tools/asahi/run-host-tests.py --only g17: 329/329 passed.
  • --only asahi-m4: 1/1 passed.

The J700 row at 7121f2eb predates main's exec_share change to context.rs, so a G17P row at this head is requested. An independent approval is still needed.

@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) and removed ci-failing A check failed at the PR head (bot) merge-conflict Conflicts with the base branch (bot) labels Dec 2, 2026

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at fa5571a77bab once the J700 and J714s rows below pass at this head.
Blockers: none in the code.
Checked: the merge of main 18edb08a is a clean merge plus the one g17/context.rs conflict, fixed by keeping both functions: main's execution_share_id() and this PR's release_unpublished(). Against main, the net diff is line for line the one approved at 7121f2eb. Main's shared-execution code doesn't change what release_unpublished() relies on, because each release it calls runs at most once (exec_share::Use::release_execution(), ExecutionRoot::release(), QosLease::give_back(), release_render_id()). A later release from teardown or drop is therefore still safe. CI at this head: apple-build and KUnit asahi pass. host-tests was cancelled, so I ran the full host-test suite at this head in the CI's Ubuntu 24.04 image: 952/952 pass, including g17-admission-order-tests and the asahi-m4 selftests. No Apple material, no gates.

Rows still owed at this head: J700 and J714s, the Vulkan sync CTS subset vs base, the duplicate-timeline-output test, and a kill/teardown stress.

Evidence
  • git merge-tree --write-tree --merge-base=42169a041546 7121f2ebd2f8 18edb08ad329 conflicts only in g17/context.rs. Every other path is identical to the tree of fa5571a7.
  • The added and removed lines of 18edb08a..fa5571a7 are identical to those of 42169a04..7121f2eb (+213/-10, 10 files).
  • tools/asahi/run-host-tests.py --jobs 20 at fa5571a7 (tree 6669eacd), rustc 1.96.0, Python 3.14.10, no network: 952/952 passed in 327 s.

@github-actions github-actions Bot removed the ci-failing A check failed at the PR head (bot) label Dec 2, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at fa5571a

Checked: The merge keeps both the execution-share accessor and unpublished-context teardown. A published context still takes the existing release path. An unpublished shared context releases only its own Use, whose done flag prevents double release; the last share releases the root. The sync bound and output coalescing are unchanged by the conflict resolution. The author reported 329/329 G17 host checks and the ABI suite passing at this head.

@github-actions github-actions Bot added the ci-failing A check failed at the PR head (bot) label Dec 3, 2026

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The merge crosses a binary replacement on the same syncobj. The parser accepts timeline 9, binary, then timeline 7 for one handle. Today the middle output replaces the fence, so the final timeline ends at 7. Coalescing timeline outputs across that replacement moves point 9 to the last output and publishes 9 instead. Treat a same-object binary output as a boundary when coalescing.

A binary output replaces the syncobj's fence, chain and points. With
timeline 9, binary, then timeline 7 on one syncobj the last point is 7,
but merging the two timeline outputs across the binary one moved point 9
to the last output and published 9.

Keep the binary outputs in the merge list as boundaries. Add a KUnit
case, and a host test that checks every list of up to five outputs on
two syncobjs against installing each output in order.

Signed-off-by: DjDeveloperr <hey@djdev.me>
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Right, that was a real bug. 0c4976b9ffb5 keeps the binary outputs in the merge list as boundaries, so timeline 9, binary, timeline 7 on one syncobj is left alone and ends at 7; timeline outputs on either side of the binary one still merge. Repeated binary outputs, a cumulative anchor and inputs that name the same syncobj are not affected.

There is a KUnit case for it, and a new host test (g17-submit-outputs-tests.py) that compares every list of up to five outputs on two syncobjs with installing each in order; it fails on fa5571a77bab. run-host-tests.py --only g17 passes 331/331, and the driver builds for arm64 with KUnit on. The J700 and J714s rows are owed at this head.

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The binary replacement case from the previous review is fixed. A binary output ends the timeline group for that syncobj and leaves other syncobjs independent. I ran the exact-head submit-output host test: 6/6 passed, including the comparison with in-order installation of short output lists. Restoring the old merge across binary outputs fails both boundary tests. Hardware rows remain pending.

@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) and removed needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 3, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

J700 (MacBook Neo, A18 Pro, T8140, G17P) row at the exact head 0c4976b9ffb5: PASS. #3200 does what it says, and nothing regresses against main.

Arms:

  • base: main 35ddf947's driver (boot 6363af85).
  • head: git merge-tree of main 35ddf947 and this head (boot 95adbf40). The tree is e6a3a406e130, and its diff against main has this PR's patch-id. It is the same tree as the J714s row, and aurora.ko is byte-identical to that row's.

Both arms use the same 7.3.0 Image, .config and every other module, so only aurora.ko differs. Each arm got one trial boot, and the J700 was verified back on stock after each.

What this PR changes, head vs base:

check base (main) head (#3200)
repeated timeline outputs, 4096 vs 1024: time ratio 12.0× 4.2× (linear)
9 + binary + 7 ends at 7 ends at 7
4097 repeated outputs point left at 4097 refused, nothing installed (point 0)
killed jobs: exec/qos still held (k, t1, t2, t3) 12/12 each 0/0 each

Everything else passed on both arms with no difference:

  • sync CTS subset: 6,426 cases recorded on both, 0 status changes, 0 new fails;
  • regression CTS, fault checks, GPUBench with CRCs, two-client close, capacity, stress;
  • whole-boot dmesg and the watchdog;
  • the hang round.

Not covered:

  • the wider sync list the J714s row uses (this row is the J700's 6,426-case list);
  • other generations.

@github-actions github-actions Bot added ready-to-merge Meets the merge policy: merge it (bot) and removed needs-hw-row No hardware row at the PR head (bot) labels Dec 4, 2026
Bring in the firmware ContextKilled acknowledgement and compute-pool
release changes for the next matched teardown verification.

Signed-off-by: DjDeveloperr <hey@djdev.me>
@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) and removed ready-to-merge Meets the merge policy: merge it (bot) labels Dec 5, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Mini checked the clean integration of fc20d119f279 onto d0684a0604a0 (tree 9f57c58febe386be830002e8580193fcca3dfaf4). Eleven of the twelve PR blobs match the head. The remaining g17/context.rs change keeps #3242's firmware-only work-state mapping, which the M5 path already used.

On this integration, git diff --check and the three G17 host fixtures passed: g17-admission-order-tests.py (held slots, retirement holds and close ordering), g17-compute-constructor-tests.py (eight cases), and g17-submit-outputs-tests.py (six cases). The admission and constructor negative controls were caught, and restoring merge-across-binary failed both expected output tests.

The J714s matched teardown row already being prepared covers #3652's kill acknowledgement and compute-pool retention. Its result is still due.

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Matched J714s post-#3652 teardown A/B control at exact head fc20d119f27956c1747ec8f322459d250b84325f (tree f2541533dc9403ead096c093c57290ed55297e7e) vs Linux main 6d2373cf060940655a97d3311397aa7fd2d55eab (tree 3c37d490f42857129faa1f76540d046cda97ccb5): PASS

  • Board & build IDs: Apple MacBook Pro 14-inch (M5 Pro / J714s / T6050 / G17S B1).
    • Base (7.3.0-main6d2373cf, boot_id=f5e6d559-a76c-4b39-87a2-17377159d345): aurora.ko build ID 18191777348520badf09b9aa57c3e506080864e0
    • Head (7.3.0-headfc20d119, boot_id=a1b1e1df-0110-4533-970f-1f4ca35d6c34): aurora.ko build ID 70cb45305f9cb15f066b0c03f9e8fbf2eebc0199
  • Unpublished-context kills (queue-only & blocked-before-publication):
    • queue-only (12 allocation-only clients SIGKILLed): head execution_contexts/qos_ids 3/3 -> 15/15 -> 3/3 (0 leaked).
    • blocked-before-publication (12 unpublished clients waiting behind 8x0.8 s compute chain, SIGKILLed with ~5.36 s remaining):
      • Head (fc20d119f279): ready 16/32 -> after_kills 4/20 -> after_chain 4/20 -> after_holder 3/20 (12/12 released immediately on kill, 0/0 held).
      • Base (6d2373cf0609): ready 16/32 -> after_kills 16/32 -> after_chain 14/31 -> after_holder 3/20 (all 12/12 held through kill until chain completion; 10/12 were still finishing post-chain teardown at the immediate after_chain snapshot, settling to 3/20 at after_holder).
  • Published-context kills & #3652 ContextKilled / compute-pool retention (published-1..4):
    • Head across 4 rounds (12 published clients; round 4 mixed with 4 unpublished clients): published contexts stayed retained across after_kills until ContextKilled acknowledgement (published-1: 16/18 -> 11/18 -> 4/18 -> 3/18; published-2: 16/20 -> 7/20 -> 4/20 -> 3/20; published-3: 16/20 -> 14/20 -> 4/20 -> 3/20; published-4-mixed: 20/24 -> 13/20 -> 4/20 -> 3/20, releasing the 4 unpublished contexts immediately while retaining active published contexts until ack, then dropping cleanly back to 3).
    • Post-kill compute and render gpubench-vk smoke passed cleanly after every kill wave: 0 early pool reuse, 0 GPU/MMU faults, healthy capacity-after.
  • Duplicate-output boundary & 4096-output submit (j700-dup-outputs --reps 5):
    • Head (fc20d119f279): PASS — medians 53.6 / 87.2 / 154.0 us (1024/2048/4096), 2.87x linear, 9+binary+7 -> 7, 4097 refused with nothing installed.
    • Base (6d2373cf0609): medians 4,311.4 / 14,232.8 / 54,259.0 us, 12.59x quadratic, 4097 accepted.
  • Kernel logs & stock return: Whole-boot kernel logs clean (0 GPU/MMU faults, 0 oops/WARN/KFENCE/use-after-free/early-reuse lines). Verified stock return to 7.3.0-m5-pr67 (boot_id=7edf8344-0107-4beb-a24a-7a5b1b298fb3, SLC enabled on 16 planes).

@github-actions github-actions Bot removed the needs-hw-row No hardware row at the PR head (bot) label Dec 5, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:gpu Area from CODEOWNERS (bot) blast:all Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants