Repository navigation
drm/asahi: g15: keep a queued poll when rearm adds its backup - #3702
Conversation
rearm() ended with mod_delayed_work_on(.., 1). When the mailbox IRQ had already queued the poll work to run now (kick() goes through poll_now() with delay 0), a submit that rearmed right after pushed that poll out a jiffy, and the poll that would have restarted the resnap timer did not run either. A completion could then be noticed up to a resnap interval (100 us) late. Queue the one-jiffy backup only if no poll is pending, as G17's backup poll does. The resnap timer's poll_now() still brings a later pending poll forward, such as the idle PB reclaim expiry that rearm used to replace, so nothing waits longer than the timer. The resnap timer restart stays: a poll that is already queued rearms after it, so the timer is started again with the new flight in view. Rebased from c474b886b5fc (written on 7.2) onto aurora-silicon/linux main: g15_repoll_us.value() is no longer dereferenced there, so that context line differs. The change itself is unchanged. Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
There was a problem hiding this comment.
Verdict: HOLD at 4a65f0d1
Blockers:
- Hosted CI at
4a65f0d1is still running (apple-build,host-tests, KUnit suites). - Pending second G15 variant hardware row (M3 base or M3 Pro) listed under Not yet before merge.
Checked:
drivers/gpu/drm/asahi/g15/poll.rs: verified replacingself.mod_poll(1)withworkqueue::system_highpri().enqueue_delayed::<Arc<Self>, POLL_WORK>(self.clone(), 1)keepsPOLL_WORKonsystem_highpri_wq, drops the clonedArc<Self>cleanly onErrwhen already pending, preventsrearm()from pushing an IRQ-queuedpoll_now()(delay = 0) out by a jiffy, and still relies on the unconditionally armedresnaphrtimer (poll_now()->mod_poll(0)) to pull forward any later idle PB reclaim work.- Exact-head J516C (M3 Max, T6031) testing at
4a65f0d1(same tree as16fd20ed): 2+2 alternating boots vsmain, headless + 120 Hz Hyprland vkmark neutral with 0 GPU faults/recoveries/hang kills.
Evidence
rearm()unconditionally restartsself.resnap_handlewithDelta::from_micros(us as i64)beforeenqueue_delayed(..., 1), so an earlier idle PB reclaim work item (Ok(false)branch atg15/poll.rs:93-95) is always pulled forward byresnap'spoll_now()(mod_poll(0)).- Code is clean; ready once hosted CI finishes green and a second G15 variant row (M3 base or M3 Pro) is posted.
There was a problem hiding this comment.
Verdict: MERGE at 4a65f0d14441
Blockers:
- None.
Checked:
- Audited the full 1-file diff (
drivers/gpu/drm/asahi/g15/poll.rs,+9/-4,MERGEABLEagainstmain): replacesself.mod_poll(1)inShared::rearm()withworkqueue::system_highpri().enqueue_delayed::<Arc<Self>, POLL_WORK>(self.clone(), 1), leaving an already-queued immediate poll undisturbed while preserving the one-jiffy backup when idle (and keepingresnaptimer forwarding of a later idle PB reclaim poll intact). - Hosted CI is completely green at
4a65f0d14441(20/20passed:apple-build,host-tests,pr-text,readiness, and all 16 KUnit suites includingKUnit asahi). - Hardware verified on the affected G15 family (
J516CMacBook Pro 16" M3 Max,T6031): 2 alternated lab boots each vsmain(972a5665),vkmarkheadless + 120 Hz fullscreen Hyprland FIFO (32,639frames,0frames over 12.5 ms vs 3 onmain),0GPU faults/recoveries/hang kills.
Evidence
- Head:
4a65f0d14441c8ad5e3025df8379b5b3a6173ec8(basemain,MERGEABLE). - Scoped strictly to G15 (
drivers/gpu/drm/asahi/g15/poll.rs); meets the merge bar cleanly on the audited diff, green CI, and G15 hardware proof without requiring extra single-generation sub-variant rows.
|
Merging at |
What: Don't let
rearm()push an already-queued G15 poll out by a jiffy. When the mailbox IRQ had queued the poll to run now, a submit that rearmed right after delayed it and the resnap timer restart, so a completion could be noticed up to 100 µs late. The one-jiffy backup is now queued only if no poll is pending, as G17's backup poll does.Tested: J516C M3 Max at 4a65f0d1 (same tree as the measured 16fd20e): 2 lab boots, no GPU faults, throughput and frame times neutral vs main 972a566.
Risk: two-way · M3 (G15: T8122, T6030, T6031, T6034)
Not yet: M3 base and M3 Pro. A workload with one frame in flight near the frame budget, where the 100 µs could show.
Details
rearm()ended withmod_delayed_work_on(.., 1).kick()goes throughpoll_now()with delay 0, so when the mailbox IRQ had already queued the poll work, a submit that rearmed right after pushed that poll out a jiffy, and the poll that would have restarted the resnap timer didn't run either.The backup is now queued only if no poll is pending. The resnap timer's
poll_now()still brings a later pending poll forward, such as the idle PB reclaim expiry that rearm used to replace, so nothing waits longer than the timer. The resnap timer restart stays: a poll that is already queued rearms after it, so the timer starts again with the new flight in view.One file,
drivers/gpu/drm/asahi/g15/poll.rs, +9/−4. First written on 7.2 (c474b886b5fc) and rebased here; only a context line differs.Evidence
MacBook Pro 16" M3 Max (J516C, T6031). Lab boots alternated main (972a566) and this change (16fd20e, same tree as 4a65f0d1),
aurora.debug_flagsbit 49 on, two boots each. On screen means vkmark cube and shading, fullscreen on Hyprland at 120 Hz with FIFO, 70 s each.vkAcquireNextImageKHRon the compositor. They don't point at this path.