Repository navigation
drm/asahi: retain VM resources until queued jobs retire - #2161
Conversation
|
Cross-check verdict: GREEN at head 0cf2efb (base integration/aurora). Reviewed by a GLM-family reviewer; the patch is byte-identical to b4d8a9bcd9d1 which was reviewed line by line (12 files, +513/-54):
Rebase note: this head rebases the identical patch onto integration/aurora with #2138 (deferred t6021 firmware restart). No adaptation was needed - the patch text is unchanged, and the deferred-restart path does not touch the VM lifetime the patch tracks. Selftests included (asahi-sigkill, asahi-userptr). Boot test on the M2 remains the outstanding item before undrafting. |
|
Thanks for this. Tracking job lifetime on every backend, not only the tracked-submission ones, is the right direction. A few points:
Rows: on an M2 and an M1 Pro, boot, then run After that, we can run no-regression rows on our M1 Pro and M2. |
|
[Joshua's agent] 1 ( 2 ( 3: Prefix fixes to Evidence: Full arm64 build clean at draft head; selftest tree present ( Hardware rows: M2 + M1 Pro: |
|
Thanks for the detail. On point 2: if the crash callback runs with interrupts disabled, then |
|
[Joshua's agent] Correction to my previous reply, verified against
The PR stays draft. The retention comment, prefix and prerequisite exits still need attention. No new build or boot results: M2 and M1 Pro |
|
Thanks for checking this against the source. I followed the same trace at
One remaining point: Still open, as you listed: the comment at |
|
[Joshua's agent] Review points 1 and 3 pushed as ce6f5e6 (parent 0cf2efb, fast-forward, no rebase):
Evidence: on the container (no GPU), |
|
Thanks. ce6f5e6 covers two of the open items: the Still open:
|
ce6f5e6 to
6521962
Compare
|
[Joshua's agent] Both remaining code items are pushed as 6521962 (branch rebased; range-diff shows the first commit changed only its subject):
On the rows, status before numbers: the installed lab kernels predate this fix and are built without |
|
Thanks for the rebuilt series. The first commit (b0abff2) now has the On the history at 6521962:
Still open, as before: |
|
[Joshua's agent] Correction to my last comment: the unreachable machine is the 14-inch M2 Max, not the 13-inch M1; the 13-inch M1 is up and running. Fleet check for your rows: no M1 Pro machine here. The M1-family laptops are a 13-inch M1 and a 16-inch M1 Max; the M2 family is the 14-inch M2 Max. Plan: package builds with the fix plus |
|
[Joshua's agent] On the M4-class smoke run: this fleet owns no M4-class machine, so that row is not available from here. Offered instead: the same smoke pass on the 13-inch M1 and the 14-inch M2 Max, the two machines already carrying the |
|
Thanks for checking. Your M1, M1 Max and M2 Max cover the M1 and M2 families for the We'll take the M4-class smoke run on our M4 Pro (T6040) at the final head. It goes with our M1 Pro and M2 no-regression rows once your rows are in. The sign-off and fold point from my previous comment still applies before those runs, so they all test the same commit. |
Per-backend job tracking so VM resources survive until queued GPU jobs retire; busy-VM deferral; one-close-path Vm::drop. Crash quarantine pins pending commands (fail_all returns bool plus mem::forget); the queue they belong to is kept alive past client close. Signed-off-by: Joshua Warren <[email protected]>
6521962 to
c5bfbfb
Compare
|
The PR is now one signed-off commit, The 13-inch M1 and 14-inch M2 Max will run the GPU lifetime selftest 50 times each and the requested dEQP-VK subset with atomic-sleep and hung-task checks enabled. The 16-inch M1 Max is reserved for another run tonight and is out of this batch. |
|
The final-head kernel is built, and both hardware test runs are queued behind a lab machine repair. |
|
Thanks. c5bfbfb is one signed-off commit, and its tree is identical to 6521962 (82594130), so the review carries over unchanged. From here it waits on your M1 and M2 Max rows ( |
|
13-inch M1 MacBook Pro, head The 50-iteration SIGKILL test stopped on the first attempt. The dEQP-VK |
|
Thanks for the M1 boot and return row on c5bfbfb. The SIGKILL run stopping at |
|
[Joshua's agent] Thanks. Agreed the SIGKILL stop was our test setup, not the PR. Re-running on that Mac with an |
|
@joshuaswarren checking open drafts today. To come out of draft, this still needs:
If it's no longer needed, say so here and we'll close it. Otherwise it stays open as a draft until these are done. |
Signed-off-by: Joshua Warren <[email protected]>
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins. |
There was a problem hiding this comment.
Verdict: FINISH, then merge at f489128a
Blockers:
- Missing exact-head
f489128ahardware boot andasahi-sigkillselftest row across affected Macs (noted underNot yet: Never booted or tested on hardware). - Queued CI checks (
apple-build,host-tests,pr-text,readiness, KUnit suites) are still pending; wait for green CI.
Checked:
f489128acleanly mergesmainoverc5bfbfb7(per-backend job lifetime tracking retaining VM resources until queued jobs retire, keeping#1360exit drain intact, plusasahi-sigkillselftest);MERGEABLEonmain, no Apple material, tool attribution, or private serials.
Evidence
- Head:
f489128a(base: main,mergeable: MERGEABLE,+512/-29across 12 files).
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
Resolve against main: pass the file memory client to new_vm_for_file() as main now requires and keep with_job_lifetime(); keep main's WorkQueue::has_published() beside this branch's new_job() signature. Signed-off-by: DjDeveloperr <[email protected]>
There was a problem hiding this comment.
Verdict: HOLD at 703ef790ec28
Blockers:
- Hosted CI at
703ef790ec28is still queued (21jobs queued:apple-build,host-tests,pr-text,readiness, and KUnit suites) — wait for all checks to complete green. - Missing exact-head hardware boot and
asahi-sigkillselftest verification row across affected Macs (carried over fromf489128a; not yet booted/tested on hardware).
Checked:
- Audited merge commit
703ef790ec28(MERGEABLEagainstmain, 12 files+512/-29): cleanly resolvesmain'snew_vm_for_file()memory-client parameter while preservingwith_job_lifetime(), and preservesmain'sWorkQueue::has_published()alongside this branch'snew_job()signature.
Evidence
- Head:
703ef790ec28c8fe9b21e955dec811863df35a39(basemain,MERGEABLE). - Status checks at review time: 21 queued, 3 skipped, 0 failed.
RyanTheTide
left a comment
There was a problem hiding this comment.
Reviewed the conflict-pass merge commit 703ef79 only: three files, no hand edits beyond taking both sides. The resolution keeps what each side had and adds nothing outside the conflict. Approved for the merge-up; merging still waits on CI and the rows at this head.
There was a problem hiding this comment.
Verdict: MERGE at 703ef790ec28
Converts this App's earlier review at the same head to an approval under the 12-01 merge bar (better than before and doesn't break; block only on a shown failure). No code blocker was found in it. The merge gate (a row on one Mac at this head + fast CI) is tracked by pr-readiness, not held here.
Checked: - Audited merge commit 703ef790ec28 (MERGEABLE against main, 12 files +512/-29): cleanly resolves main's new_vm_for_file() memory-client parameter while preserving with_job_lifetime(), and preserves main's WorkQueue::has_published() alongside this branch's new_job() signature.
Follow-ups (not blocking): queued CI; hardware boot + asahi-sigkill selftest row
|
Thanks for the nudge, Ryan. The run at the current head is still planned in our lab — the same Mac with the hardware this touches, the SIGKILL loop plus the dEQP-VK memory/api.buffer subsets — with a committed owner; results and the ready-for-review flip follow the run. If the rerun cannot be scheduled within the week we will close this instead of holding the draft. |
|
J616s (MacBook Pro 14", M4 Pro, T6040, G16) at |
|
Merging at |
What
Retains Asahi DRM VM resources until queued GPU jobs retire (carried from omacom/linux-aurora#472 with its two commits).
Adds per-backend job lifetime tracking so VM mappings survive until queued work finishes, pins pending commands on firmware crash in
fail_all()so each keeps its VM guard and binding past client close, defers busy-VM teardown, unifiesVm::droponto one close path, and adds thetools/testing/selftests/drivers/gpu/asahi-sigkill/selftest. Complementary to merged #1360 (exit drain), keeping all of #1360 intact.Tested
drivers/gpu/drm/asahi/compiled cleanly after conflict resolution.Risk
two-way · Apple Silicon Macs using the drm/asahi GPU driver.
Not yet
Never booted or tested on hardware; the
asahi-sigkillselftest has not been run on a Mac yet.