diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-11-15 17:54:09 -0500 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-11-15 17:54:09 -0500 |
| commit | 3481e62d9ae97ec7f354d252aa93bb765b8a7964 (patch) | |
| tree | 763b17c83a03573639aeab1a9ce261f7407a3b82 /kernel | |
| parent | dab4a02cdda99a37c412322680b17cceb1c518f1 (diff) | |
| download | open-iov-3481e62d9ae97ec7f354d252aa93bb765b8a7964.tar.gz open-iov-3481e62d9ae97ec7f354d252aa93bb765b8a7964.zip | |
vgsp: eng68 - chain the release after any GR launch that leaves it owed
c796: the release armed (MME-CARRY-ARM mode=release, held=68) when the
client's own launch completed the pack, but that launch's poll owned
the forwarding slot; the beef channel unregistered 0.99 s later
(+0.1 s ARM) and the release only saw request-inflight/no-channel.
The client's pack-completing launch is often its last push.
Generalize eng64's chain: after ANY successful GR launch of the
release's own beef handle, if the release is still owed
(gsp_phys_gr_mme_release_owed_for), wait the settle grace in the same
slot, claim and run the release work directly. The synthetic pack
carrier path is unchanged; the release work still owns the outcome
publish and INFLIGHT clear.
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/gsp_phys_booter.c | 21 | ||||
| -rw-r--r-- | kernel/gsp_phys_booter.h | 1 | ||||
| -rw-r--r-- | kernel/gsp_sema_service.c | 27 |
3 files changed, 36 insertions, 13 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c index 607e947..a98a588 100644 --- a/kernel/gsp_phys_booter.c +++ b/kernel/gsp_phys_booter.c @@ -19551,6 +19551,27 @@ bool gsp_phys_gr_mme_release_take(u32 h_object, u32 *held, u32 *win) return true; } +/* + * eng68: the release is owed for a specific beef handle. The service + * chains the release after ANY successful GR launch of that handle (not + * only the synthetic pack carrier): the client's pack-completing launch is + * often the last push before it closes the channel (c796: release ARM at + * +0.1 s, beef channel unregistered +0.99 s, no pump pass could fire it). + * The chained release runs in the same forwarding slot immediately. + */ +bool gsp_phys_gr_mme_release_owed_for(u32 h_object) +{ + struct gsp_phys_gr_mme_release_state *s = &gsp_phys_gr_mme_release; + unsigned long flags; + bool owed; + + spin_lock_irqsave(&gsp_phys_gr_mme_release_lock, flags); + owed = s->valid && s->armed && !s->fired && !s->consumed && + s->h_object == h_object; + spin_unlock_irqrestore(&gsp_phys_gr_mme_release_lock, flags); + return owed; +} + /* An armed release is still owed (before its grace deadline too). */ bool gsp_phys_gr_mme_release_waiting(void) { diff --git a/kernel/gsp_phys_booter.h b/kernel/gsp_phys_booter.h index 30aef8f..964ed3e 100644 --- a/kernel/gsp_phys_booter.h +++ b/kernel/gsp_phys_booter.h @@ -597,6 +597,7 @@ void gsp_phys_gr_mme_carry_failed(int rc); */ bool gsp_phys_gr_mme_release_peek(u32 *h_object); bool gsp_phys_gr_mme_release_waiting(void); +bool gsp_phys_gr_mme_release_owed_for(u32 h_object); bool gsp_phys_gr_mme_release_chain_enabled(void); bool gsp_phys_gr_mme_release_take(u32 h_object, u32 *held, u32 *win); void gsp_phys_gr_mme_release_rearm(void); diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c index 435386e..4a7180e 100644 --- a/kernel/gsp_sema_service.c +++ b/kernel/gsp_sema_service.c @@ -39162,19 +39162,20 @@ static void svc_fwd_gr_work(void) } /* - * Chain the saved-window release behind a successful host pack - * carrier: the carrier's launch poll owns the single forwarding slot - * for up to sema_mme_fast_ms, and the client's 3D channel may tear - * down before the next service pass fires the armed release (c779: - * release ARM at +0.1 s, beef channel unregistered ~2.2 s later -> - * MME-CARRY-HOLD reason=no-channel). Wait out the release's settle - * grace inside this slot, claim it, and run the release work - * directly, so the saved window reaches the engine while the channel - * is still alive. The release work owns the outcome publish and the - * INFLIGHT clear. - */ - if (!hw_rc && svc_fwd_req.gr_synthetic && !svc_fwd_req.gr_release && - gsp_phys_gr_mme_release_chain_enabled()) { + * Chain the saved-window release behind a successful GR launch of + * the release's own beef handle: the launch poll owns the single + * forwarding slot (up to sema_mme_fast_ms), and the client's 3D + * channel may tear down before the next service pass fires the armed + * release (c779: release ARM at +0.1 s, channel unregistered ~2.2 s + * later -> no-channel; c796: +0.1 s vs +0.99 s). Wait out the + * release's settle grace inside this slot, claim it, and run the + * release work directly, so the saved window reaches the engine while + * the channel is still alive. The release work owns the outcome + * publish and the INFLIGHT clear. + */ + if (!hw_rc && !svc_fwd_req.gr_release && + gsp_phys_gr_mme_release_chain_enabled() && + gsp_phys_gr_mme_release_owed_for(svc_fwd_req.gr_h_object)) { unsigned long deadline = jiffies + msecs_to_jiffies(500); u32 rheld = 0, rwin = 0; bool took = false; |
