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

Add C++ allocator #18

Open
5 tasks
mcopik opened this issue Mar 6, 2023 · 7 comments
Open
5 tasks

Add C++ allocator #18

mcopik opened this issue Mar 6, 2023 · 7 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@mcopik
Copy link
Contributor

mcopik commented Mar 6, 2023

Currently, we expose a very low-level interface for allocating memory - as shown in this documentation:

  rdmalib::Buffer<char> in(opts.input_size, rdmalib::functions::Submission::DATA_HEADER_SIZE), out(opts.input_size);
  in.register_memory(executor._state.pd(), IBV_ACCESS_LOCAL_WRITE);
  out.register_memory(executor._state.pd(), IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_WRITE);

While rdmalib::Buffer is applicable, we need a higher-level concept based on the CX++ std::allocator to integrate RDMA-managed memory into user applications.

  • Add allocator implementation in rfaaslib.
  • Encapsulate the memory registration in rdmalib - provide generic enums for local/remote read/write ops + atomics.
  • Support in allocator registration and deregistration of memory.
  • Add test demonstrating standard memory allocation.
  • Add test demonstrating allocation with std::vector and our custom allocator.
@mcopik mcopik added enhancement New feature or request good first issue Good for newcomers labels Mar 6, 2023
@veenaamb
Copy link

Hey @mcopik , can I work on this issue?

@mcopik
Copy link
Contributor Author

mcopik commented Mar 15, 2023

@veenaamb Sure, go ahead! Let me know if you need any assistance :)

@mcopik
Copy link
Contributor Author

mcopik commented Mar 28, 2023

@veenaamb Are you still working on the issue?

William-Mou pushed a commit to William-Mou/rFaaS that referenced this issue Apr 2, 2023
- Compiled successfully without any errors.
- Add allocator implementation in rfaaslib.
- Encapsulate the memory registration in rdmalib
- Add test demonstrating standard memory allocation.
@lbhnsh
Copy link

lbhnsh commented Feb 29, 2024

Hi, if nobody is working on this issue, can I take this up?
@mcopik

@mcopik
Copy link
Contributor Author

mcopik commented Mar 7, 2024

@lbhnsh Yes, please do! There is an open PR #30, but it requires some changes that I highlighted in the comments - we should be allocating page-aligned memory blocks of given size and returning properly initialized instances of buffer<T> . buffer is an abstraction to hide the actual memory block and make sure we properly apply or RDMA-related operations.

@lbhnsh
Copy link

lbhnsh commented Mar 19, 2024

Hi, you have mentioned to add allocator implementation in rfaaslib, so just wanted to clarify in which specific folder should the changes be made as there is not a specific folder that exactly has the name rfaaslib
Thank you
@mcopik

@mcopik
Copy link
Contributor Author

mcopik commented Mar 19, 2024

@lbhnsh You can follow what has been done in the PR #30 - add this in rfaaslib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: To do
Development

No branches or pull requests

3 participants