Allow external adjustment of parallel search workers - #233
Open
zayenz wants to merge 16 commits into
Open
Conversation
zayenz
force-pushed
the
feature/par-search-worker-adjustments
branch
from
July 28, 2026 08:23
5db14f4 to
5f9d5e0
Compare
zayenz
marked this pull request as ready for review
July 28, 2026 13:57
added 5 commits
August 20, 2026 08:48
Retain PBS asset seeds while builders clone them so nested construction failures cannot delete a seed twice. Honor worker-control pauses at sequential DFS/BAB search boundaries, preserving PBS stop wakeups. Reject unsupported pausing in builds without threads and controlled assets in sequential outer portfolios. Cover the failures, resumption, and placement rules in the search checks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A portfolio may need to move a fixed CPU budget between search engines without rebuilding them. This PR adds
Search::WorkerControl, a copyable handle that changes how many pre-created workers an engine may execute.The initial
threadsvalue remains the fixed resident capacity.request()is thread-safe and does not wait for the engine to reach the requested count. Growing wakes parked workers; shrinking lets an in-flight search action finish before its worker parks. Zero pauses search without discarding its state, and a positive request resumes it. DFS and BAB also honor pause requests when the resolved capacity is one, including requests made duringnext().Controls apply to DFS and BAB leaves owned by RBS and PBS. PBS keeps one control per asset; allocation policy and the portfolio-wide budget remain with the caller. Explicit controlled assets require parallel outer PBS execution; sequential outer PBS rejects them with
WorkerControlInUsebecause a paused asset would prevent it from running siblings. A paused asset in parallel PBS observes the internal stop and reports when another asset closes the round. Its request remains zero and its search state is preserved. If every active asset is paused,next()waits until one resumes.TimeStophas no timer thread to wake a paused engine.A control binds to one logical leaf-engine lifetime. Copies share request state, while an empty handle preserves fixed-worker behavior. Builds without thread support reject an initially paused attachment and
request(0)withInvalidWorkerRequest; controls in those builds are restricted to use from one thread.PBS retains ownership of each asset seed while building the asset with
clone=true. Nested construction failures can therefore clean up without deleting the same space twice. This adds one space clone per asset during construction; search execution is unchanged.Validation:
The Windows vcpkg job uses one current commit for both its checkout and builtin baseline. The previous baseline selected a GMP portfile referencing an MSYS2 autoconf archive that is no longer available.