Skip to content

Conversation

@SiskaPavel
Copy link
Collaborator

@SiskaPavel SiskaPavel commented Jul 30, 2025

Summary

Replace numa_bind with numa_set_preferred for flexible memory allocation

Details

Switched from numa_bind() to numa_set_preferred() with numa_set_bind_policy(0) to allow preferred NUMA node memory allocation without hard binding. This enables memory to be allocated on the preferred NUMA node first, but allows fallback to others when necessary.


✅ Checks

  • CI pipeline passes (build, tests, lint, static analysis)
  • New code follows clang-tidy rules
  • The change is clearly related to a specific issue / requirement
  • The PR is rebased on the latest master
  • No unrelated changes are included
    - [ ] Relevant documentation was updated (if needed)
    - [ ] Documentation (e.g. Doxygen) is updated if needed

@SiskaPavel SiskaPavel self-assigned this Jul 30, 2025
@SiskaPavel SiskaPavel requested review from Copilot and hynekkar July 30, 2025 16:25
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR replaces strict NUMA node binding with a preferred NUMA policy in the NFB plugin's NDP reader implementation. The change allows for more flexible memory allocation by using a preferred node approach instead of hard binding.

  • Switched from numa_bind() to numa_set_preferred() for NUMA memory allocation
  • Added numa_set_bind_policy(0) to enable fallback to other nodes when the preferred node is unavailable
  • Simplified error handling by removing the nodemask allocation/deallocation

…ory allocation

Switched from `numa_bind()` to `numa_set_preferred()` with `numa_set_bind_policy(0)` to allow
preferred NUMA node memory allocation without hard binding. This enables memory to be allocated
on the preferred NUMA node first, but allows fallback to others when necessary.
@SiskaPavel SiskaPavel merged commit 926bb92 into master Jul 31, 2025
8 checks passed
@SiskaPavel SiskaPavel deleted the nfb-numa-policy branch July 31, 2025 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants