← Back to Pull requests

OCPBUGS-116486: PPC: split reserved CPUs across NUMA nodes by default #1676

Open
unknown opened this pull request with 427 lines diff across 5 files
View on GitHub
unknown unknown commented on Oct 26, 2026 10:51 UTC
Author

Reserved CPU allocation across NUMA nodes

Summary


This PR improves how the Performance Profile Creator (PPC) assigns reserved CPUs on multi-NUMA-node hosts. It makes splitting reserved CPUs across NUMA nodes the default, and changes the split to hand out whole physical cores round-robin so valid requests no longer fail on an odd per-node count.

It contains two commits:
1. PPC: reserve whole cores round-robin across NUMA nodes when hyperthreading is enabled
2. PPC: split reserved CPUs across NUMA nodes by default

Problem


  • With hyperthreading enabled, the split logic divided reservedCPUCount evenly and required each NUMA node to hold the same number. When that per-node number was odd it aborted:
  •   Error: failed to compute the reserved and isolated CPUs: can't allocate odd number of CPUs from a NUMA Node
      

    For example, --reserved-cpu-count=102 on a 2-NUMA-node host tried to put 51 CPUs on each node and failed, even though 102 whole cores are perfectly allocatable.

  • Separately, combining --topology-manager-policy=single-numa-node with --split-reserved-cpus-across-numa=true was rejected as an error, even though splitting across NUMA nodes is the desirable behavior whenever the hardware exposes more than one NUMA node.
  • Changes

    Whole-core round-robin allocation


  • Hand out whole physical cores round-robin across the NUMA nodes that have CPUs, so hyperthread sibling pairs are never split and nodes are not required to hold an equal (possibly odd) count.

  • NUMA nodes without CPUs (memory-only nodes) are skipped.

  • Validity is confirmed by checking the loop landed on the exact requested count; because cores are added whole, a request that is not a multiple of the per-core logical-processor count overshoots and is rejected. This is SMT-width agnostic (2-way, SMT-4, etc.), not hardcoded to 2.

  • The non-hyperthreaded path keeps the existing even split unchanged.
  • Split across NUMA by default


  • Default --split-reserved-cpus-across-numa to true.

  • Instead of failing, emit a warning when it is disabled on a node that has multiple NUMA nodes. The warning is based on the real hardware CPU topology and is independent of --topology-manager-policy.
  • Example


    --reserved-cpu-count=102 on a 2-NUMA-node, 104-CPU host now splits 52 / 50 instead of failing:

    PPC: 102 reserved CPUs allocated: 0-50,52-102
    PPC: 2 isolated CPUs allocated: 51,103
    

    PPC: 2 isolated CPUs allocated: 51,103
    ``
    The leftover whole core (
    51, 103`) is left isolated.

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    New Features
    Reserved CPUs are now split across NUMA nodes by default, including when using the single-NUMA-node topology policy.
    With hyperthreading enabled, CPU allocation distributes whole physical cores round-robin across NUMA nodes, skipping nodes without available cores. The number of reserved CPUs must be a multiple of logical processors per core.
    Documentation
    Updated help and README guidance to explain NUMA splitting, allocation behavior, and how to disable splitting.
    Bug Fixes
    * The tool now completes successfully in supported NUMA-splitting scenarios and provides guidance when splitting is disabled across multiple nodes.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 427 lines (+320 / -107) across 5 files Reviewer: MarSik Review duration: 48597m
    All Vouch review confidence checks passed
    Residual risk 0.29 = Change Risk (0.52) × (1 − Review Confidence (0.45)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 427 lines diff across 5 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    44%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Diff Size diff_size
    0.363
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #1676"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 44.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52.1% (MEDIUM) · Higher = larger blast radius
    52.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 44.7% · Lower = rushed or shallow review
    44.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 28.8% · Safe to merge
    28.8%