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 10 commits into
mainfrom
fix/g17-submit-syncs-and-closed-queues
Open

DjDeveloperr wants to merge 10 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: host build of drivers/gpu/drm/asahi (asahi.config, LLVM, Rust) at 43f3740cfbd05: builds, no new warnings; checkpatch --strict 0 errors, 0 warnings, 0 checks on each commit. b04ba72e86ee only adds the new API to two host-test stand-ins, with no runtime change. At it, g17-admission-order-tests (25/25, mutations included) and the asahi-m4 suite pass locally. Hardware rows on J714s (the M5 combined candidate) and J700 are in progress; they cover the runtime code, which b04ba72e86ee doesn't touch.

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.

Not yet: J700 (A18 Pro) and J714s (M5 Pro) rows: the Vulkan sync CTS subset against base, both tests below, and a kill/teardown stress. CI.

Details

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. The cumulative anchor never merges, so an output aliasing it is still refused. The merge sorts only the outputs that can merge, and allocates only when there are at least two of them.

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.
    • 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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
@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 7121f2eb: not ready yet

Check Detail
CI at head no failing: host-tests, KUnit isp, KUnit isp, KUnit jpeg, KUnit jpeg, KUnit prores
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok not needed: no runtime change
Conflicts no merge conflicts with main: merge it in (no force push)
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 <[email protected]>
@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) merge-conflict Conflicts with the base branch (bot) and removed ci-failing A check failed at the PR head (bot) labels Nov 26, 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: FINISH, then merge at ccdf52ab

Blockers:

  1. Merge conflict (CONFLICTING) against main; rebase onto current main and re-run CI (14 checks were cancelled at ccdf52ab).

Checked:

  • Verified mergeability (CONFLICTING) and existing J714s M5 Pro A/B PASS row in the PR comments.
  • Deferred final diff approval until the conflict against main is resolved and CI finishes green.
Evidence
  • Head ccdf52ab vs main: CONFLICTING; CI 5 passed, 14 cancelled.

Forward-merge main. Main made release_queue() close the context only
once (is_closed()/note_closed(), as Firmware::close_failed_owners may
have closed it already); this branch returns an unpublished context's
identities after the close unless teardown retained a scheduler.
backend.rs keeps main's single close and takes "retained" from it,
false when the queue was closed earlier: release_unpublished() itself
does nothing for a published context, which every context
close_failed_owners closes is. The admission-order test stand-in keeps
the no-op release_unpublished() next to main's note_closed/is_closed.

Signed-off-by: Ryan Murray <[email protected]>

@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 13b8b42d9b67

Blockers: None (wait for queued CI to finish green).

Checked:

  • Forward merge 13b8b42d9b67 of main (MERGEABLE): g17/runtime/backend.rs preserves main's !self.context.is_closed() single-close guard and calls self.context.release_unpublished() whenever !retained (teardown.close() returns Ok(true) if tracked or published, Ok(false) otherwise).
  • Full audit of all three fixes across file.rs, gpu.rs, g15/command.rs, g16/command.rs, g17/{context,mod,teardown,runtime/backend}.rs, and host/KUnit tests:
    • MAX_SYNCS_PER_SUBMISSION (4096) via Gpu::max_syncs() checked in File::submit() before copying or allocating sync arrays (in_sync_count as usize + out_sync_count as usize cannot overflow 64-bit usize).
    • SyncItem::coalesce_outputs() / coalesce_timeline_outputs(): excludes the cumulative anchor so aliasing outputs stay refused, keeps the last timeline output per syncobj raised to max point, accurately shifts anchor by removed indices < anchor, and drops merged entries in O(N) before SignalBundle::new() or chain node allocation.
    • Context::release_unpublished(): guarded by if self.is_published() { return; } and backed by idempotent release_execution(), QosLease::give_back() (returned.swap(true, Ordering::AcqRel)), and release_render_id() (take()), returning finite pool IDs at close rather than waiting for cancelled drm_sched jobs.
  • Prior J773g (G16G, 11,834 sync CTS cases) and J714s (M5 Pro G17S, 146,489 sync/fence/semaphore CTS cases) A/B PASS rows stand with unchanged core logic; KUnit (asahi_submit_outputs, an_id_given_back_early_is_given_back_once) and host tests pass.
Evidence
  • Verified teardown::Pending::close() returns Ok(true) for both existing teardown entries and newly inserted published contexts, and Ok(false) only for never-published contexts.
  • 20 CI checks at 13b8b42d9b67 are queued at review time (0 failures); approve now so merge can proceed once CI goes green.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Forward-merged main into this branch (merge commit 13b8b42, no force push). In g17/runtime/backend.rs, main now closes a context only once (is_closed()/note_closed(), because close_failed_owners may have closed it already). The merge keeps that single close and takes retained from it. When the queue was closed earlier, retained is false, and release_unpublished() then does nothing because every context close_failed_owners closes is published. The admission-order test stand-in keeps your no-op release_unpublished() next to main's note_closed/is_closed/note_open_client.
Tests: run-host-tests.py --only g17 passed 258 jobs, including g17-admission-order-tests and all its mutations. asahi-m4 test-command-stream.py passed 29/29. Only g17-compute-owed-stamp-tests failed, and it fails on main too (a stale note_retired() stub); this merge did not cause it.
Still needed: CI and App re-review. The backend change adds one guard around your release path, so a short J714s killed-jobs + dup-outputs run at this head is advisable before merge. Thanks @DjDeveloperr.

@RyanTheTide

Copy link
Copy Markdown
Contributor

code-owner ping <@422957901716652033>: merge train at 13b8b42d. App approved (NEON-PR-REVIEW2). The rows in your "Not yet" are the gate: J700 + J714s, the Vulkan sync CTS subset against base, both tests, and the kill/teardown stress. It merges under the 6-point rule once they're posted at this head and CI is green.

@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 Nov 29, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor

I merged current main into this branch (cdbf1626, normal push, no rebase, your commits unchanged). The last CI failures came from main itself on 11-29: the apple-scaler-recovery and g17-compute-owed-stamp fixtures, plus the apple-dcp harness break fixed in #3672. Re-running a job would reuse the old merge commit, so a fresh merge was the only way to clear them. Both merges were conflict-free. Host tests pass on the merged tree. The PR's own code is unchanged from 13b8b42d, so the existing hardware rows still cover it. Next: CI at this head and the review app's verdict.

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

Copy link
Copy Markdown
Contributor

@DjDeveloperr code-owner notice: the review app approved this head, which only merges main in, and the existing rows on two families cover the code. I'll merge it under the 6-point rule once CI is green here, no earlier than 1 h from now. Say hold if you object.

main (#3021) made the parsed sync list a KVVec, and this branch's
coalesce_outputs() still took a KVec, so the forward merge no longer
builds (E0308 at file.rs:332). Take &mut KVVec<SyncItem>; the body only
uses Vec methods.

Signed-off-by: Ryan Murray <[email protected]>

@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: HOLD at 7121f2eb

Blockers:

  • Pending CI at head 7121f2eb: All 18 build and test checks (apple-build, host-tests, and all 16 KUnit suites including KUnit asahi) are currently QUEUED (pr-text and readiness passed). Code and the KVVec fix are clean; ready to approve as soon as CI completes green.

Checked:

  • Commit ff6b9485 (drivers/gpu/drm/asahi/file.rs): updates SyncItem::coalesce_outputs() from &mut KVec<SyncItem> to &mut KVVec<SyncItem> to match main's #3021 parsed sync list type (Vec<T, KVmalloc>), preserving .iter(), indexing, and .retain() semantics identically.
  • Merge 7121f2eb of origin/main (42169a04): clean merge with MERGEABLE status; all previously reviewed changes (MAX_SYNCS_PER_SUBMISSION, coalesce_timeline_outputs() + KUnit tests, QosLease::give_back() / Context::release_unpublished(), g17/runtime/backend.rs !self.context.is_closed() single-close + !retained release, g17/teardown.rs Result<bool>, and host/selftest fixtures) remain intact.
Evidence
  • Diff reviewed: linux#3200 at 7121f2ebd2f895683ab7de53e9e1ebb7fec8056a (+213/-10, 10 files, MERGEABLE on main), delta since previously approved cdbf1626 is ff6b9485 (+1/-1 in drivers/gpu/drm/asahi/file.rs) plus clean merge of main 42169a04.
  • CI snapshot at review time: pr-text (SUCCESS), readiness (SUCCESS), 18 build/KUnit/host-tests jobs QUEUED.

@RyanTheTide

Copy link
Copy Markdown
Contributor

CI caught a build break in my forward merge (apple-build, E0308 at file.rs:332). main (#3021) made the parsed sync list a KVVec, and this branch's coalesce_outputs() still took a KVec. Git merged it cleanly, and the host tests don't compile the driver, so neither caught it. ff6b9485 changes only the parameter type; the body uses plain Vec methods. 7121f2eb merges current main on top. drivers/gpu/drm/asahi/ builds (arm64, LLVM) and the g17 host tests pass 291/291. No behaviour changes, so the J773g and J714s rows still cover it. Next: CI and the review app at this head.

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

J700 (MacBook Neo, A18 Pro, G17P) at 7121f2ebd2f8: PASS.

  • Kernel: 7.3.0-neo-rows3, built from main dbfbced70b31 with this head merged unchanged, plus drm/asahi: g17: name the owning process when a compute publication gives up #3240 and iommu/apple-dart: fail closed when an unmap's TLB retirement fails #3310, which touch other files. It used the Neo's 7.3.0-41 config and was booted one-shot twice. The running vmlinux and aurora.ko build IDs (c63915f98aca, dfa14493e160) matched the build.
  • Vulkan sync CTS subset: 6,050 Pass, 376 NotSupported, 0 Fail, 0 recoveries. This covers synchronization{,2}.{basic,smoke,timeline_semaphore,internally_synchronized_queues,none_stage}.* and api.external.{fence,semaphore}.*, 6,426 cases, with the system Mesa 26.3.0-30. The result is identical, case for case, to stock 7.3.0-41 with the same Mesa.
  • dup-outputs: PASS.
    • 1024, 2048 and 4096 outputs naming one timeline took 0.12, 0.20 and 0.44 ms (ratio 3.6), and every rising point from 1 to 4096 was waitable.
    • 4097 syncs were refused with nothing installed.
    • Stock 7.3.0-41 fails: 6.3, 24.5 and 78.4 ms (ratio 12.4), and it accepts 4097.
  • killed-jobs: PASS. Killed jobs held 0 execution contexts and 0 QoS IDs. Stock holds 12 and 12.
  • Kill and teardown stress: 60 deqp-vk sync clients were SIGKILLed at random points, followed by three killed-jobs rounds and a final client. All passed, with 0 GPU faults and 0 WARN or oops lines.
  • Kernel log, both boots: 0 GPU faults, 0 recoveries, 0 WARN/BUG lines. The only G17 lines are the "refused a submission" lines that dup-outputs' empty command streams are expected to cause.
  • Restore: each boot returned to stock 7.3.0-41, and the test files were removed, matching the pre-install snapshot.

@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 7121f2e once current hosted checks pass.

Checked: The merge-up type fix accepts the same KVVec that main now uses for parsed syncs. It changes the parameter type without changing coalescing order or the close path. The current-head J700 result matches stock on the sync CTS subset and passes duplicate outputs and kill/teardown stress.

@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) merge-conflict Conflicts with the base branch (bot) labels Dec 1, 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) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) merge-conflict Conflicts with the base branch (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants