Skip to content

Add backoff to hostcall timeout - #13599

Merged
litvaOo merged 11 commits into
developfrom
users/b-sumner/hostcall-timeout-backoff
Oct 26, 2026
Merged

litvaOo merged 11 commits into
developfrom
users/b-sumner/hostcall-timeout-backoff

Conversation

@b-sumner

Copy link
Copy Markdown
Contributor

Motivation

The new hostcall implementation had a short timeout. This patch allows it to increase when there is no activity.

Technical Details

Adds a simple doubling scheme to the timeout to a maximum that matches the original hostcall implementation.

Test Plan

Benchmarks and other hostcall tests.

Test Result

All tests passed

Submission Checklist

Copilot AI balanced review requested due to automatic review settings October 15, 2026 21:44
@b-sumner
b-sumner requested a review from a team as a code owner October 15, 2026 21:44
@therock-pr-bot

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 ⚠️ Warning Error: Source/code files changed without an accompanying unit test.
Expected: add at least one test file named like test_<name>.py / test_<name>.cpp (or <name>_test.*).
Current: code file(s) changed: projects/clr/rocclr/device/devhostcall.cpp; no test file found
🔎 pre-commit ⏳ Pending ⏳ Still running…
🚫 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

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.

🟢 Approval recommended

The localized backoff is bounded, preserves signal and termination handling, and has no identified blocking issues.

0 open findings

What changed in this PR

Adds bounded timeout backoff to the new hostcall listener, reducing polling during inactivity.

Changes:

  • Doubles the timeout after idle waits, capped at the legacy implementation’s maximum.
  • Resets the timeout when activity resumes or the signal changes.
File Description
projects/​clr/​rocclr/​device/​devhostcall.cpp Adds timeout bounds, idle backoff, and activity resets.

🧠 Review effort: Balanced


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

@mangupta mangupta 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.

🤖 AI-assisted pre-review (for @mangupta)

@mangupta

Copy link
Copy Markdown
Contributor

🤖 AI-assisted pre-review (for @mangupta)

Re-reviewed the updated head (ec2803f4adbc) — no new findings at or above the posting threshold.

@mangupta

Copy link
Copy Markdown
Contributor

🤖 AI-assisted pre-review (for @mangupta)

Re-reviewed the updated head (4f46ee79360d) — no new findings at or above the posting threshold.

@b-sumner

Copy link
Copy Markdown
Contributor Author

I think it is pretty sad that this change, which is not being compiled in since the new implementation is not being enabled, is still seeing failing check.

@mangupta

Copy link
Copy Markdown
Contributor

🤖 AI-assisted pre-review (for @mangupta)

Re-reviewed the updated head (5eb3e882bd25) — no new findings at or above the posting threshold.

@mangupta

Copy link
Copy Markdown
Contributor

🤖 AI-assisted pre-review (for @mangupta)

Re-reviewed the updated head (2246516681f9) — no new findings at or above the posting threshold.

@mangupta

Copy link
Copy Markdown
Contributor

🤖 AI-assisted pre-review (for @mangupta)

Re-reviewed the updated head (bbfcb38671be) — no new findings at or above the posting threshold.

@mangupta

Copy link
Copy Markdown
Contributor

🤖 AI-assisted pre-review (for @mangupta)

Re-reviewed the updated head (5d80df66f45e) — no new findings at or above the posting threshold.

@litvaOo
litvaOo merged commit dabdea0 into develop Oct 26, 2026
408 of 412 checks passed
@litvaOo
litvaOo deleted the users/b-sumner/hostcall-timeout-backoff branch October 26, 2026 13:34
@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.

5 participants