Files
mac_linuxgpu/scripts
geramyloveless cda0670cd9 Client records go with every client, and a missing session is an error
The compute backend keeps one record per runtime client in a fixed table
of 64, and client IDs are never reused. Records were cleared only when a
participant that was not the last one left. The last leaver's session
close, Linux-file clients, session clients that never joined, and the
records of a stopped session all kept theirs. After 64 clients over the
dext's lifetime, a new client got no record: its identity failed
silently, QueryInfo tag 12 said "not ready", HSA went on with the session
unreported on the legacy path, and queue creation failed with
OUT_OF_RESOURCES.

- Every Stop path forgets the client's record: session clients
  (participant or not, including the last leaver whose leaving closes
  the session), Linux-file clients and observers. A client outside the
  session that still owns a KFD process (opened by its QueryInfo)
  releases it. dext_compute_stop forgets every record with no KFD process
  left. A record whose KFD process could not be closed stays, and the log
  says so along with the record count.
- No record for a client is loud. Its identity failure is logged, its
  InitDevice fails with kIOReturnNoResources, and tag 12 fails with
  kIOReturnNoResources.
- A KFD process that cannot be opened on a device that supports KFD is
  that client's error on every compute call (tag 12, tag 10, BO alloc,
  import, queue create, host window). It no longer falls back to the
  legacy path, which may have no HQD at all. The open is not retried, and
  the log carries its errno.
- HSA: a driver that has tag 12 and gives no session fails hsa_init at
  that query, with a message naming it, instead of continuing on the
  legacy path into a queue OOM.

Tests:
- dext_compute production: client-churn runs 256 rounds of every client
  kind through join and leave, plus a kept KFD record; client-churn-close
  runs 256 last-leaver close-and-restart cycles; client-records-full
  checks the loud full-table path; kfd-open-failure now expects the error.
- session shutdown: client-churn drives every Stop path 256 times
  against a 64-record model; last-leaver-churn runs 256 closing last
  clients.
- HSA shim init: a refused or modeless tag 12 fails initialization.

client-churn-close fails on the 7c6afe9 backend at the 65th client, and
both session churn scenarios fail on the 7c6afe9 driver source.
2026-10-05 16:30:21 -07:00
..