Skip to content

[rocjitsu] Coalesce command processor stall retries - #12697

Merged
kuhar merged 1 commit into
developfrom
users/kuhar/pm4-retry-coalescing
Oct 5, 2026
Merged

kuhar merged 1 commit into
developfrom
users/kuhar/pm4-retry-coalescing

Conversation

@kuhar

@kuhar kuhar commented Oct 2, 2026

Copy link
Copy Markdown
Member

Keep one pending retry for blocked command streams. Multiple queues and retry sites otherwise multiply doorbell events, delaying shader progress and exhausting host memory.

A Mesa Crysis replay on gfx1100 accumulated 680 million queued events. Cover persistent dependencies on two PM4 queues and completion after they become ready.

@kuhar
kuhar requested a review from Groverkss October 2, 2026 17:59
@kuhar
kuhar requested review from a team and atgutier as code owners October 2, 2026 17:59
Copilot AI balanced review requested due to automatic review settings October 2, 2026 17:59
@therock-pr-bot

therock-pr-bot Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

❌ PR Check — Action Required

Check Status Details
📝 PR Description ❌ Fail Error: PR description must reference a JIRA ID, ISSUE ID, or a GitHub closing keyword.
Expected: include a JIRA ID / ISSUE ID line (separator : or -, or omitted; value may be a JIRA key, a number with/without #, or a link), OR a closing keyword + issue reference. Accepted examples:
• JIRA ID : TESTAUTO-6039
• JIRA ID - #330
• JIRA ID #330
• JIRA ID (on separate line)
ROCM-25757
• ISSUE ID : TESTUTO-3334
• ISSUE ID #3334
• ISSUE ID - TESTAUTO-3433
• ISSUE ID (on separate line)
AIRUNTIME-2352
• ISSUE ID : https://github.com/<org_name>/<repo_name>/issues/1234
• Closes #10
• Fixes octo-org/octo-repo#100
• Resolves: #123
• #123
• https://github.com/<org_name>/<repo_name>/issues/123
Current: no valid JIRA/ISSUE/closing-keyword reference found
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass —
🔎 pre-commit ✅ Pass —
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

⚠️ 1 policy check(s) failed. Please address the issues above before this PR can be Reviewed.

🚫 Please fix the failed policies

  • ❌ PR Description

The Not ready to Review label was added to this PR. Once all policies pass, the label is removed automatically.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@therock-pr-bot

therock-pr-bot Bot commented Oct 2, 2026

Copy link
Copy Markdown

🚫 Please fix the failed policies before requesting reviews.

The following policy checks failed:

  • ❌ PR Description

The Not ready to Review label has been added to this PR.
Once all policies pass, the label will be removed automatically.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

No blocking issues remain, and targeted verification supports bounded retry retention under repeated deadline resets.

Review effort: Balanced
Findings: None

What changed in this PR

Coalesces AMDGPU command-processor stall retries to prevent event multiplication and excessive host-memory use while preserving prompt wakeups.

Changes:

  • Tracks one active retry deadline and ignores superseded callbacks.
  • Resets backoff for runnable work and invalidates retries at shutdown.
  • Adds regression coverage for blocked queues, completion wakeups, and service timing.
File Description
emulation/​rocjitsu/​tests/​pm4_compute_queue_test.cpp Tests bounded retries and prompt PM4 queue progress.
emulation/​rocjitsu/​tests/​amdgpu_vm_test.cpp Tests earlier rechecks for fresh AQL stalls.
emulation/​rocjitsu/​lib/​rocjitsu/​src/​rocjitsu/​vm/​amdgpu/​command_processor.h Adds retry deadline and generation state.
emulation/​rocjitsu/​lib/​rocjitsu/​src/​rocjitsu/​vm/​amdgpu/​command_processor.cpp Implements coalescing, wakeup resets, and shutdown invalidation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Keep one pending retry for blocked command streams. Multiple queues and retry sites otherwise multiply doorbell events, delaying shader progress and exhausting host memory.

A Mesa Crysis replay on gfx1100 accumulated 680 million queued events. Cover persistent dependencies on two PM4 queues and completion after they become ready.
@kuhar
kuhar force-pushed the users/kuhar/pm4-retry-coalescing branch from a3d02cd to 156113d Compare October 5, 2026 16:08
@kuhar
kuhar merged commit dfdb4fb into develop Oct 5, 2026
85 of 86 checks passed
@kuhar
kuhar deleted the users/kuhar/pm4-retry-coalescing branch October 5, 2026 18:39
@systems-assistant

Copy link
Copy Markdown
Contributor

TheRock Submodule Bump Activity

Newest first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants