common: move the LIBFABRIC post thread pool to src/utils/common #2745
All Vouch review confidence checks passed
Residual risk 0.23 = Change Risk (0.40) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 290 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.339
Real PR Conversation Timeline
1 comments
"Review active on #2745"
general
weight: 0.35
tvegas1
Part of #2498. Split out of #2695, as asked in its review, so that it lands on its own; #2695 stacks on it.
What?
nixl::threadPoolinsrc/utils/common/thread_pool.hisnixlLibfabricPostThreadPoolmade generic:- a fire-and-forget
submit(std::function<void()>);- tasks queued before destruction still run;
- an exception-safe constructor;
- it stays on
std::thread, clear of the Mooncake Transfer Engine'slibasio.so(#2588).post_thread_count_is taken from the pool, so it still reflects the cap.Why?
In #2499's review, tvegas1 asked to share one pool between LIBFABRIC and MOONCAKE (r4567484179). MOONCAKE switches to it in #2695.
Behavior changes
num_threadsis over the cap now readsCapping thread pool from N to M threads. It used to readCapping libfabric post thread count from N to M.Testing
On a GB200 host without EFA, using libfabric 1.22.0 with the
tcpprovider:threadPoolTest.: passes.libfabric_backend_test: passes.num_threads0 and 4. Withnum_threads=100000the pool caps at 560 threads (4 × 140) with the warning above.AI assistance: Claude Code wrote this change and its test, and ran the builds and tests.
🤖 Generated with Claude Code
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Improvements
Descriptor posting in the Libfabric backend now uses a shared worker pool, with the effective worker count adjusted to supported limits.
Task processing continues during orderly shutdown, helping ensure queued work is completed.
Tests
Added coverage verifying that submitted tasks complete when the worker pool shuts down.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->