Closed bitboom closed 2 months ago
What this PR is doing has to do with our off-line discussion today? a new yet efficient method to enforce one-time copy using rust syntax.
What this PR is doing has to do with our off-line discussion today? a new yet efficient method to enforce one-time copy using rust syntax.
In our offline discussion, we also talked about taking ownership of individual fields in the structure when reading them individually. Additional considerations are required to support these matters.
Background
To mitigate concurrency issues with memory regions shared between the host and RMM, the
host::copy_from
operation was used to copy data from the host.Problem
However, for the RMI_DATA_CREATE case, this mitigation let to double copy costs.
This PR
To address this, a new function
host::direct_copy_from
has been added to perform the copy in a single step.