Skip to content

D3D12.X: measure contended queue submission turns - #101

Draft
bmjask wants to merge 1 commit into
stack/097-cache-extended-streamsfrom
stack/098-measure-queue-contention
Draft

bmjask wants to merge 1 commit into
stack/097-cache-extended-streamsfrom
stack/098-measure-queue-contention

Conversation

@bmjask

@bmjask bmjask commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Stacked on #100.

This is an internal draft stack in bmjask/xcl; it is not an upstream merge request.

What and why

This unit isolates d3d12.x: measure contended queue submission turns as one reviewable step in the redesign.

What is in it

  • 9cdf92e3 is the cleaned-stack form of integrated commit e8b7b346.

The patch content is preserved; only ancestry changed to omit a canceled add/revert sequence.

Tested

Tests were not rerun while packaging this already-integrated change into the draft stack.

Regression run

Not run during stack packaging.

Not tested

  • Windows MSVC build and test suite
  • D3D12 GPU execution
  • scripts/smoke.ps1 main/head comparison

AI use

Codex, GPT-5.6-sol, removed canceled ancestry, created the stack branch, and drafted this description. It did not author new code during stack packaging.

@bmjask
bmjask force-pushed the stack/098-measure-queue-contention branch from 9cdf92e to 7c2ed8e Compare November 27, 2026 00:46
@bmjask
bmjask force-pushed the stack/097-cache-extended-streams branch from 2469cbe to d4a7b98 Compare November 27, 2026 01:01
@bmjask
bmjask force-pushed the stack/098-measure-queue-contention branch from 7c2ed8e to cb53008 Compare November 27, 2026 01:01
bmjask pushed a commit that referenced this pull request Nov 27, 2026
The three lines of the first commit read "none / none / 0" in runs where
the title had stopped after its first #101: no fence and no queue was
behind, yet nothing was presented. What showed the stop was a SYNC_GRAPH
cell whose recorded value is above what was submitted and completed,
with no GPU wait armed: a list that writes the value was recorded and
never submitted, so the submitting thread is held (GreemSC's runs, RX
7900 XT; the thread dump then named that thread).

cells_behind_summary lists such cells, and those with armed waits:
memory, completed, submitted (and on which queue), recorded and CPU
values, and the armed waits with their age. It takes the graph with
try_lock, since a dump can come while a submitting thread holds it.
The cell is read with ReadProcessMemory (dstorage::read_own), since
the title can decommit its page at any time; an unreadable cell shows
"mem unreadable" (bmjask's review).
The function is GreemSC's, from the review of this PR.

Co-authored-by: GreemSC <57862153+GreemSC@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XZrhsCAiLU1tTuEBwPLaRW
bmjask pushed a commit that referenced this pull request Nov 27, 2026
The three lines of the first commit read "none / none / 0" in runs where
the title had stopped after its first #101: no fence and no queue was
behind, yet nothing was presented. What showed the stop was a SYNC_GRAPH
cell whose recorded value is above what was submitted and completed,
with no GPU wait armed: a list that writes the value was recorded and
never submitted, so the submitting thread is held (GreemSC's runs, RX
7900 XT; the thread dump then named that thread).

cells_behind_summary lists such cells, and those with armed waits:
memory, completed, submitted (and on which queue), recorded and CPU
values, and the armed waits with their age. It takes the graph with
try_lock, since a dump can come while a submitting thread holds it.
The cell is read with ReadProcessMemory (dstorage::read_own), since
the title can decommit its page at any time; an unreadable cell shows
"mem unreadable" (bmjask's review).
The function is GreemSC's, from the review of this PR.

Co-authored-by: GreemSC <57862153+GreemSC@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XZrhsCAiLU1tTuEBwPLaRW
bmjask pushed a commit that referenced this pull request Nov 27, 2026
The three lines of the first commit read "none / none / 0" in runs where
the title had stopped after its first #101: no fence and no queue was
behind, yet nothing was presented. What showed the stop was a SYNC_GRAPH
cell whose recorded value is above what was submitted and completed,
with no GPU wait armed: a list that writes the value was recorded and
never submitted, so the submitting thread is held (GreemSC's runs, RX
7900 XT; the thread dump then named that thread).

cells_behind_summary lists such cells, and those with armed waits:
memory, completed, submitted (and on which queue), recorded and CPU
values, and the armed waits with their age. It takes the graph with
try_lock, since a dump can come while a submitting thread holds it.
The cell is read with ReadProcessMemory (dstorage::read_own), since
the title can decommit its page at any time; an unreadable cell shows
"mem unreadable" (bmjask's review).
The function is GreemSC's, from the review of this PR.

Co-authored-by: GreemSC <57862153+GreemSC@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XZrhsCAiLU1tTuEBwPLaRW
bmjask pushed a commit that referenced this pull request Nov 27, 2026
The three lines of the first commit read "none / none / 0" in runs where
the title had stopped after its first #101: no fence and no queue was
behind, yet nothing was presented. What showed the stop was a SYNC_GRAPH
cell whose recorded value is above what was submitted and completed,
with no GPU wait armed: a list that writes the value was recorded and
never submitted, so the submitting thread is held (GreemSC's runs, RX
7900 XT; the thread dump then named that thread).

cells_behind_summary lists such cells, and those with armed waits:
memory, completed, submitted (and on which queue), recorded and CPU
values, and the armed waits with their age. It takes the graph with
try_lock, since a dump can come while a submitting thread holds it.
The cell is read with ReadProcessMemory (dstorage::read_own), since
the title can decommit its page at any time; an unreadable cell shows
"mem unreadable" (bmjask's review).
The function is GreemSC's, from the review of this PR.

Co-authored-by: GreemSC <57862153+GreemSC@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XZrhsCAiLU1tTuEBwPLaRW
Assisted-by: Codex (GPT-5.6-sol)
Record the wait under the existing lock-contention stall category only when another thread owns the same queue lease. Uncontended queue operations do not start a recorder span.

Assisted-by: Codex (GPT-5.6-sol)
@bmjask
bmjask force-pushed the stack/098-measure-queue-contention branch from cb53008 to fdb37ab Compare November 27, 2026 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant