rFaaS icon indicating copy to clipboard operation
rFaaS copied to clipboard

Add C++ allocator

Open mcopik opened this issue 2 years ago • 7 comments

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 avatar Mar 06 '23 17:03 mcopik

Hey @mcopik , can I work on this issue?

veenaamb avatar Mar 15 '23 11:03 veenaamb

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

mcopik avatar Mar 15 '23 17:03 mcopik

@veenaamb Are you still working on the issue?

mcopik avatar Mar 28 '23 23:03 mcopik

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

lbhnsh avatar Feb 29 '24 09:02 lbhnsh

@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.

mcopik avatar Mar 07 '24 11:03 mcopik

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

lbhnsh avatar Mar 19 '24 11:03 lbhnsh

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

mcopik avatar Mar 19 '24 16:03 mcopik