Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check if numa available or not before loading numa functions #1163

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

TingDaoK
Copy link
Contributor

@TingDaoK TingDaoK commented Oct 28, 2024

Issue #, if available:

#1162

Description of changes:

Before any other calls in this library can be used numa_available() must be called. If it returns -1, all other functions in this library are undefined.

Referring to https://linux.die.net/man/3/numa_available. So, if numa_available() return -1, skip loading any other functions from libnuma.

  • We are lacking tests for numa functionalities, which is a concern.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-commenter
Copy link

codecov-commenter commented Oct 28, 2024

Codecov Report

Attention: Patch coverage is 71.42857% with 4 lines in your changes missing coverage. Please review.

Project coverage is 83.60%. Comparing base (6f20cfb) to head (418bbea).

Files with missing lines Patch % Lines
source/common.c 71.42% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1163      +/-   ##
==========================================
- Coverage   83.61%   83.60%   -0.02%     
==========================================
  Files          57       57              
  Lines        5946     5948       +2     
==========================================
+ Hits         4972     4973       +1     
- Misses        974      975       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TingDaoK TingDaoK marked this pull request as ready for review October 28, 2024 20:59
@TingDaoK TingDaoK changed the title check if numa available or not check if numa available or not before loading numa functions Oct 28, 2024
@TingDaoK TingDaoK merged commit bb29dc8 into main Oct 29, 2024
53 checks passed
@TingDaoK TingDaoK deleted the numa-available branch October 29, 2024 16:34
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