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

memory: remove libnuma dependency #2645

Merged
merged 1 commit into from
Feb 17, 2025
Merged

Conversation

rockwotj
Copy link
Contributor

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

@rockwotj
Copy link
Contributor Author

ugh I missed that dpdk required this, will re-add it to the build for dpdk only

@rockwotj rockwotj force-pushed the no-libnuma branch 2 times, most recently from dddf217 to 56a28fa Compare February 17, 2025 20:39
maxnode,
flags
);
}
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Corrected. Thank you!

&nodemask, std::numeric_limits<unsigned long>::digits,
MPOL_MF_MOVE);
static constexpr int mpol_preferred = 1;
static constexpr unsigned int mpol_mf_move = 2;
Copy link
Member

@avikivity avikivity Feb 17, 2025

Choose a reason for hiding this comment

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

#include <linux/mempolicy.h>?

Copy link
Contributor Author

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
@rockwotj rockwotj requested a review from avikivity February 17, 2025 21:45
@avikivity avikivity merged commit 8ab0267 into scylladb:master Feb 17, 2025
15 checks passed
@rockwotj rockwotj deleted the no-libnuma branch February 18, 2025 00:07
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.

2 participants