-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
memory: remove libnuma dependency #2645
Conversation
ugh I missed that dpdk required this, will re-add it to the build for dpdk only |
dddf217
to
56a28fa
Compare
maxnode, | ||
flags | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our coding style uses 4-space indents, not two.
I don't think the reinterpret_casts are required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected. Thank you!
src/core/memory.cc
Outdated
&nodemask, std::numeric_limits<unsigned long>::digits, | ||
MPOL_MF_MOVE); | ||
static constexpr int mpol_preferred = 1; | ||
static constexpr unsigned int mpol_mf_move = 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#include <linux/mempolicy.h>?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes thanks! Fixed.
Seastar is currently pulling in all of libnuma to just invoke a single syscall. Additionally since libnuma being LGPL licensed, it's simpler to not include it as a dependency. Replace the call in numaif.h with a direct syscall. I'm assuming that once libnuma was depended on because it was a dependency of hwloc, however, hwloc version 2 removed the dependency on libnuma, so Seastar can too: https://github.com/open-mpi/hwloc/blob/263908a2c1f21c0e221a8d1f6472daf3a1fc07b9/NEWS#L291
Seastar is currently pulling in all of libnuma to just invoke a single
syscall. Additionally since libnuma being LGPL licensed, it's simpler
to not include it as a dependency. Replace the call in numaif.h with
a direct syscall.
I'm assuming that once libnuma was depended on because it was a
dependency of hwloc, however, hwloc version 2 removed the dependency
on libnuma, so Seastar can too:
https://github.com/open-mpi/hwloc/blob/263908a2c1f21c0e221a8d1f6472daf3a1fc07b9/NEWS#L291