[Driver/C] add topology checks (die locality, L3 cache sharing) for configured affinities - #2120
Open
EmilJohn24 wants to merge 15 commits into
Open
[Driver/C] add topology checks (die locality, L3 cache sharing) for configured affinities#2120EmilJohn24 wants to merge 15 commits into
EmilJohn24 wants to merge 15 commits into
Conversation
…affinity from user configuration.
…w functions for validation.
…plementation of group table for L3 cache affinity validation.
…ed, including name metadata. This removes the pairwise comparison in favor of traversing the actual array in the struct itself.
…. Generalize validation method in aeron_driver.c for both die locality and L3 cache checks.
…r-bot recommendations.
EmilJohn24
force-pushed
the
feature/affinity_validation
branch
from
August 17, 2026 02:25
ff50ea4 to
29d76b7
Compare
…s when an error occurs instead of skipping and returning
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 68c0f91. Configure here.
| aeron_free(cpus); | ||
| return -1; | ||
| #endif | ||
| return 0; |
There was a problem hiding this comment.
Non-Linux skips cpuset affinity errors
Low Severity
aeron_driver_validate_and_apply_affinity_configuration is entirely wrapped in #ifdef __linux__, so on other platforms it always returns success. Enabling cpuset_affinity outside Linux used to fail in aeron_driver_apply_cpuset_affinity; that error path is no longer reached.
Reviewed by Cursor Bugbot for commit 68c0f91. Configure here.
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.


Note
Medium Risk
Changes driver thread CPU pinning and Linux startup path for affinity/cpuset; misconfiguration could affect latency-sensitive agent isolation, though behavior is mostly additive warnings plus clearer separation of configured vs resolved CPUs.
Overview
Expands Linux driver startup affinity handling by routing
aeronmdthroughaeron_driver_validate_and_apply_affinity_configurationinstead of onlyaeron_driver_apply_cpuset_affinity.The driver now keeps configured affinity indices (
*_cpu_affinity_no) separate from resolved CPUs (*_cpu_affinity_resolved). Cpuset mapping writes only the resolved fields; thread pinning uses those resolved values so configured settings stay visible in dumps and APIs.New warnings (rolled into the existing
cpuset_warnings_as_errorstotal): duplicate affinity across conductor/sender/receiver/native resource agent pairs; L3 cache domain spread for resolved affinities (via newaeron_topology_build_l3_group_table); die locality spread (viaaeron_topology_build_die_locality_group_table). Topology helpers addaeron_topology_cpu_info_tand related grouping APIs.Tests cover cpuset resolution behavior, L3/die group tables, and the new validation functions.
Reviewed by Cursor Bugbot for commit 3f8b57c. Bugbot is set up for automated code reviews on this repo. Configure here.