Repository navigation
Make pool and I/O reactor startup safe under pinned creators - #2
ivanmilevtues wants to merge 2 commits into
Conversation
Truncate worker names to Linux's limit and reuse bounded CPU affinity handling. Cover observable names and affinity with CPU-only Catch2 tests. Amp-Thread-ID: https://ampcode.com/threads/T-01a1c140-9c31-7237-bc6b-617fa475f82a Co-authored-by: Amp <amp@ampcode.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
CodeBoarding review · failedYour CodeBoarding quota is exhausted. Buy a CodeBoarding license at https://codeboarding.org/pricing, or wait for your weekly reset. See the workflow logs. |
Use the process main thread's CPU mask for default worker placement. Apply names and affinity before initialization and reactor work, propagate pool initializer failures, and join workers on partial startup failure. Prepare reactor names and masks before spawning so allocation failures remain recoverable. Inspired by NVIDIA/cuCascade PRs NVIDIA#240 and NVIDIA#243; retain the existing pool API and cover startup ordering, failure cleanup, and real REST worker affinity. NVIDIA#240 NVIDIA#243 Amp-Thread-ID: https://ampcode.com/threads/T-01a1c140-9c31-7237-bc6b-617fa475f82a Co-authored-by: Amp <amp@ampcode.com>
|
/codeboarding |
CodeBoarding review - not configured
1. Add a repository secret named 2. In with:
llm: license
license_key: ${{ secrets.CODEBOARDING_LICENSE }}No analysis ran, and no CodeBoarding hosted usage was consumed. run 42667198403 - attempt 1 |
Purpose and upstream inspiration
A larger, genuine C++ worker-startup change for the CodeBoarding architecture-diff showcase. Leave this example PR unmerged. No generated analysis is edited.
This adapts two concrete upstream cuCascade problems to this fork's older I/O implementation:
Changes
The pool now calls compiled utilities from
cucascade_io; standalone header-only users must link that implementation. In-tree pool consumers already use the I/O layer. Empty pool CPU lists intentionally change from creator-thread inheritance to process-main-thread affinity.Concrete before/after scenarios
These are exercised by
test/exec/test_thread_pool.cppand the real REST-worker test intest/io/rest/test_rest_footer_resolve.cpp. The CPU numbers illustrate the tested machine's mask, not hard-coded placement requirements.Verification
CUCASCADE_BUILD_CUDF=OFF. The supplied liburing package had incompatible generated headers; liburing 2.15 was rebuilt locally against the compiler sysroot, without changing repository dependencies.redirect is already activeassertion and aborted (132 passed, 3 failed at that point). No failure is hidden or fixed outside this PR's scope.Architecture map
Live PR map. The last inspected rendering still showed the original small commit
7783e3a(+53/−13), explicitly marking expanded head87a5eabas not analyzed. Both the expanded review and its user-requested rerun failed on hosted quota (HTTP 402, token limit reached). A larger source diff cannot repair quota or refresh a stale map.Bounded local analysis of the same five pool/utility/reactor files, using actual CMake compiler context for both base and head, resolves a new pool-constructor →
thread_util::get_process_affinitycall atinclude/cucascade/exec/thread_pool.hpp:54. Under the current baseline component assignments this crosses Task Execution Framework → Thread Execution Utilities. This relationship was absent from the equivalent baseline sample. Reactor → Thread Execution Utilities already existed throughset_thread_name; this PR changes those call sites to process-affinity discovery and worker-local setup, rather than inventing a new reactor component relationship.Hosted baseline diagnostics show missing project headers; the default-context local run also misses these calls. Providing the real compiler context resolves them. This is local call-resolution evidence, not proof that the hosted component map displays an added edge. No generated analysis or hosted analyzer configuration was changed. The bounded run still has a liburing header diagnostic and does not replace whole-project analysis.