rpma_flush(3)
β¨ rpma_flush β initiate the flush operation β¨
okay bestie, welcome to the RPMA Programmer's Manual, page rpma_flush(3) π this one is short and sweet and honestly kinda iconic β it's the "okay we're DONE, push it through" of memory transfers. let's go π«Ά
πΈ SYNOPSIS πΈ
#include <librpma.h>
struct rpma_conn;
struct rpma_mr_remote;
enum rpma_flush_type {
RPMA_FLUSH_TYPE_PERSISTENT,
RPMA_FLUSH_TYPE_VISIBILITY,
};
int rpma_flush(struct rpma_conn *conn,
struct rpma_mr_remote *dst, size_t dst_offset,
size_t len, enum rpma_flush_type type, int flags,
const void *op_context);
π DESCRIPTION π
rpma_flush() initiates the flush operation β and what that means is you're finalizing a transfer of data to the remote memory. like, the data is out there, and now we make it official. periodt.
so there are possible types of rpma_flush() operation, and you gotta pick one:
RPMA_FLUSH_TYPE_PERSISTENTβ flush data down to the persistent domain π (yes, all the way down, no half measures)RPMA_FLUSH_TYPE_VISIBILITYβ flush data deep enough to make it visible on the remote node π (visible, not necessarily persisted β know the difference, iykyk)
then the attribute flags sets the completion notification indicator:
RPMA_F_COMPLETION_ON_ERRORβ generate the completion on errorRPMA_F_COMPLETION_ALWAYSβ generate the completion regardless of result of the operation.
and op_context? that lil baby gets returned in the wr_id field of the completion (struct ibv_wc). so you can match up your callback with your vibe. π«
β RETURN VALUE β
the rpma_flush() function returns 0 on success or a negative error code on failure. no cap.
π ERRORS π
rpma_flush() can fail with the following errors β screenshot this, bestie:
RPMA_E_INVALβconnordstisNULLRPMA_E_INVALβ unknowntypevalueRPMA_E_INVALβflagsare not setRPMA_E_PROVIDERβibv_post_send(3)failedRPMA_E_NOSUPPβtypeisRPMA_FLUSH_TYPE_PERSISTENTand the direct write to pmem is not supported
not me getting RPMA_E_NOSUPP because persistent just isn't on the menu for this setup π check your pmem support before you commit, fr fr.
π¦ SEE ALSO π¦
rpma_conn_req_connect(3)rpma_mr_remote_from_descriptor(3)librpma(7)- and https://pmem.io/rpma/ π
and that's the whole page, angel π this was the RPMA manual, dated 01 April 2024 β go forth and flush responsibly, you absolute main character ππ
π¦ where this page comes from
- ubuntu noble: librpma-dev 1.3.0-2build2 Β· BSD-3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms