summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-11 17:50:52 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-11 17:50:52 -0400
commitf55e8f74d0b04ea2d670dce37c9547769212774d (patch)
treed43d621e18f101256447cb8381f699c4a5c4542f /kernel
parent6fc5d5809672ee84616963e0d46f9c36a2404a35 (diff)
downloadopen-iov-f55e8f74d0b04ea2d670dce37c9547769212774d.tar.gz
open-iov-f55e8f74d0b04ea2d670dce37c9547769212774d.zip
Revert "vgsp-sema: session boundary is a client change, not the last channel closing (ISSUE-0002)"
This reverts commit b839a12de675818f41a8cb388e5663d804c2a1f7.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/gsp_sema_service.c50
1 files changed, 10 insertions, 40 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c
index 9f967a5..638a866 100644
--- a/kernel/gsp_sema_service.c
+++ b/kernel/gsp_sema_service.c
@@ -451,11 +451,6 @@ static u32 svc_ring_n;
*/
static u8 svc_sess_flush;
static u8 svc_sess_active; /* a channel of a session has registered (until flush) */
-static u32 svc_sess_client; /* owning client of the current session's channels.
- * The kernel/GPU-global channels (the CeUtils
- * scrubber) persist across clients; the session
- * boundary is a change of owning client, not the
- * last channel closing (ISSUE-0002 r79). */
static struct completion svc_sess_flush_done; /* a pending flush has executed */
static unsigned long svc_ring_done; /* CE ranks whose ring is pinned (session state) */
static u8 svc_pb_passes;
@@ -955,20 +950,6 @@ void gsp_sema_service_channel_add(const struct sema_channel_desc *desc)
WRITE_ONCE(svc_gr_content_rearm, true);
/*
- * ISSUE-0002 (r79): the kernel/GPU-global channels (the CeUtils
- * scrubber, entries=4096) persist across client sessions, so the
- * "last channel closed" trigger never fires once they are kept
- * registered. The real session boundary is a change of owning
- * client: when a channel of a new client registers while the
- * previous session's state is still live, request the same flush a
- * session end would (the wait below then lets svc_thread execute it
- * before this session's state exists).
- */
- if (desc->h_client && svc_sess_client &&
- desc->h_client != svc_sess_client && svc_sess_active)
- WRITE_ONCE(svc_sess_flush, 1);
-
- /*
* ISSUE-0002: a session-end flush may still be pending on svc_thread.
* It must not execute after this session's state exists (r9: the
* deferred flush ran between the first and second channel
@@ -1069,8 +1050,6 @@ void gsp_sema_service_channel_add(const struct sema_channel_desc *desc)
}
ch->valid = true;
svc_sess_active = 1;
- if (desc->h_client)
- svc_sess_client = desc->h_client;
ch->h_object = desc->h_object;
ch->h_client = desc->h_client;
ch->engine_type = desc->engine_type;
@@ -1157,28 +1136,19 @@ void gsp_sema_service_channel_del(u32 h_object, u32 h_client)
break;
}
/*
- * ISSUE-0002: when the last channel of the current session's client
- * closes, the next client is a new session in a new UVM VA space; its
- * discovery state must not inherit this session's map/pins/page-
- * directory latch. Request the flush here; it executes at the next
- * rebuild (the only writer of that state) just like a fresh boot
- * would start empty. Only the transition from "a session existed" to
- * "empty" may request it: redundant deletes for handles that never
- * registered would otherwise re-flush (and wipe) a session that
- * started after the real one ended. Persistent kernel/GPU-global
- * channels (a different owning client, e.g. the CeUtils scrubber) do
- * not keep the session open (ISSUE-0002 r79: with the scrubber kept
- * registered the old all-channels check never fired and the next
- * client inherited stale state).
+ * ISSUE-0002: when the last channel closes, the next client is a new
+ * session in a new UVM VA space; its discovery state must not inherit
+ * this session's map/pins/page-directory latch. Request the flush
+ * here; it executes at the next rebuild (the only writer of that
+ * state) just like a fresh boot would start empty. Only the transition
+ * from "a session existed" to "empty" may request it: redundant
+ * deletes for handles that never registered would otherwise re-flush
+ * (and wipe) a session that started after the real one ended.
*/
if (svc_sess_active) {
for (i = 0; i < SVC_MAX_CHANNELS; i++) {
- if (!svc.chan[i].valid)
- continue;
- if (svc_sess_client && svc.chan[i].h_client &&
- svc.chan[i].h_client != svc_sess_client)
- continue;
- break;
+ if (svc.chan[i].valid)
+ break;
}
if (i == SVC_MAX_CHANNELS) {
svc_sess_active = 0;