summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-24 02:06:57 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-24 02:06:57 -0400
commit64cca43699d6b74a1f2f2c5e087d33c7aba59de1 (patch)
tree618a8171e0d03c226df34670c5c7b53ddcb96158
parentf3225a81ca384248180d77f78c3614c73dcf289d (diff)
downloadopen-iov-64cca43699d6b74a1f2f2c5e087d33c7aba59de1.tar.gz
open-iov-64cca43699d6b74a1f2f2c5e087d33c7aba59de1.zip
Revert "vgsp-gr r590b: the stream-order watermark must watch every ring, not engine_type!=0"
This reverts commit f3225a81ca384248180d77f78c3614c73dcf289d.
-rw-r--r--kernel/gsp_sema_service.c33
1 files changed, 11 insertions, 22 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c
index 0f71e8b..a0cdb2b 100644
--- a/kernel/gsp_sema_service.c
+++ b/kernel/gsp_sema_service.c
@@ -21114,25 +21114,15 @@ static struct svc_channel *svc_pass_local;
static u32 svc_pass_local_n;
/*
- * r590: does any ring of this device still hold entries this pass's pump has
- * not consumed? Reads the ring's live GP_PUT from its own USERD and compares
- * it (modulo the ring size) with the snapshot's last_get. A mismatch means
- * the client submitted work the pump has not decoded yet - exactly the
- * stream-order backlog the r541/r568 guards cannot see.
- *
- * r590b (r591 draw): the driver submits its relocation/H2D copies on a
- * COMPUTE channel (h=0x5c000059 registers eng=0), not a dedicated CE
- * channel, so the engine_type filter skipped the very backlog this guard
- * exists for. Every other channel of the device is now considered; the
- * launching channel itself is excluded because its own ring legitimately
- * runs ahead (its next entries are futures, not dependencies) and holding
- * on it would deadlock the launch against its own channel.
- *
+ * r590: does any CE ring of this device still hold entries this pass's pump
+ * has not consumed? Reads the ring's live GP_PUT from its own USERD and
+ * compares it (modulo the ring size) with the snapshot's last_get. A
+ * mismatch means the client submitted copies/fills the pump has not decoded
+ * yet - exactly the stream-order backlog the r541/r568 guards cannot see.
* Channels whose USERD is unreadable are skipped (their work cannot be
* ordered by this mechanism anyway).
*/
-static bool svc_ce_stream_backlog(struct nv_vgpu_device *vgpu,
- const struct svc_channel *self)
+static bool svc_ce_stream_backlog(struct nv_vgpu_device *vgpu)
{
u32 k;
@@ -21142,9 +21132,8 @@ static bool svc_ce_stream_backlog(struct nv_vgpu_device *vgpu,
const struct svc_channel *c = &svc_pass_local[k];
u32 put = 0;
- if (!c->valid || (vgpu && c->vgpu != vgpu))
- continue;
- if (self && c->h_object == self->h_object)
+ if (!c->valid || (vgpu && c->vgpu != vgpu) ||
+ !c->engine_type)
continue;
if (!c->gpfifo_entries || !c->userd_pa)
continue;
@@ -21183,7 +21172,7 @@ static void svc_gr_dec_dump(const struct svc_channel *ch)
dstpend = svc_gr_dstpend_overlap();
copypend = svc_copy_pending();
- ceback = svc_ce_stream_backlog(NULL, ch);
+ ceback = svc_ce_stream_backlog(NULL);
pr_info("vgsp-gr: GR-DEC h=0x%x push=0x%llx n_data=%u dropped=%u partial=%d stalled=%d dstpend=%d copypend=%d ceback=%d defer_exp=%d\n",
ch->h_object, svc_gr_cand.push_va, svc_fwd_req.gr_n_data,
@@ -21329,7 +21318,7 @@ static bool svc_gr_request(struct nv_vgpu_device *vgpu,
if (gsp_phys_gr_dec_log_max &&
(svc_fwd_req.gr_dropped > 0 || svc_fwd_req.gr_arg_partial ||
svc_gr_data_stalled || svc_gr_dstpend_overlap() ||
- svc_copy_pending() || svc_ce_stream_backlog(vgpu, ch)))
+ svc_copy_pending() || svc_ce_stream_backlog(vgpu)))
svc_gr_dec_dump(ch);
/*
* r541: launch-ordering guard. The fill's data pages are what the
@@ -21412,7 +21401,7 @@ static bool svc_gr_request(struct nv_vgpu_device *vgpu,
* historical forward stands (witnessed) - the guard delays a launch,
* it never refuses one, so it cannot recreate r588's mail refusal.
*/
- if (svc_ce_stream_backlog(vgpu, ch)) {
+ if (svc_ce_stream_backlog(vgpu)) {
if (!svc_gr_defer_expired(svc_gr_cand.push_va)) {
clear_bit_unlock(SVC_FWD_INFLIGHT, &svc_fwd_state);
mutex_unlock(&svc_fwd_lock);