Skip to content

mem_scrub: propagate scrub wait failures - #1304

Open
TimZaman wants to merge 1 commit into
NVIDIA:mainfrom
TimZaman:codex/mem-scrub-fail-fast
Open

mem_scrub: propagate scrub wait failures#1304
TimZaman wants to merge 1 commit into
NVIDIA:mainfrom
TimZaman:codex/mem-scrub-fail-fast

Conversation

@TimZaman

@TimZaman TimZaman commented Aug 17, 2026

Copy link
Copy Markdown

When the scrub work list is full, scrubSubmitPages() waits for older scrub work to complete before submitting more pages.

If _scrubWaitAndSave() times out, _scrubCheckAndSubmit() currently returns 0. The outer loop treats that as progress even though scrubListSize and free entries do not change, so it retries forever and repeatedly (trillions of times; 3k/s...) prints:

_scrubWaitAndSave: Timed out when waiting for scrub jobs to finish
NV_ERR_TIMEOUT ... @ mem_scrub.c:741

Before

_scrubWaitAndSave() returns NV_ERR_TIMEOUT
→ _scrubCheckAndSubmit() returns 0
→ scrubSubmitPages() subtracts 0, advances curPagesSaved, and retries
→ loop condition never changes
→ timeout/log repeats indefinitely

This PR

_scrubCheckAndSubmit() returns the original error plus actual submitted/saved counts
→ scrubSubmitPages() applies only real progress
→ timeout/error exits immediately instead of retrying
→ completed scrub work is still returned to PMA

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants