1RPMEM_PERSIST(3)           PMDK Programmer's Manual           RPMEM_PERSIST(3)
2
3
4

NAME

6       rpmem_persist(),  rpmem_deep_persist(),  rpmem_read(),  -  functions to
7       copy and read remote pools
8

SYNOPSIS

10              #include <librpmem.h>
11
12              int rpmem_persist(RPMEMpool *rpp, size_t offset,
13                  size_t length, unsigned lane, unsigned flags);
14              int rpmem_deep_persist(RPMEMpool *rpp, size_t offset,
15                  size_t length, unsigned lane);
16              int rpmem_read(RPMEMpool *rpp, void *buff, size_t offset,
17                  size_t length, unsigned lane);
18

DESCRIPTION

20       The rpmem_persist() function copies data of given length at given  off‐
21       set  from  the  associated local memory pool and makes sure the data is
22       persistent on the remote node before the function returns.  The  remote
23       node is identified by the rpp handle which must be returned from either
24       rpmem_open(3) or  rpmem_create(3).   The  offset  is  relative  to  the
25       pool_addr  specified  in the rpmem_open(3) or rpmem_create(3) call.  If
26       the remote pool was created using  rpmem_create()  with  non-NULL  cre‐
27       ate_attr  argument, offset has to be greater or equal to 4096.  In that
28       case the first 4096 bytes of the pool is  used  for  storing  the  pool
29       matadata  and cannot be overwritten.  If the pool was created with NULL
30       create_attr argument, the pool metadata is not stored with the pool and
31       offset  can  be any nonnegative number.  The offset and length combined
32       must not exceed the pool_size passed  to  rpmem_open(3)  or  rpmem_cre‐
33       ate(3).   The  rpmem_persist()  operation  is performed using the given
34       lane number.  The lane must be less than  the  value  returned  by  rp‐
35       mem_open(3)  or  rpmem_create(3) through the nlanes argument (so it can
36       take a value from 0 to nlanes - 1).  The flags argument can be 0 or RP‐
37       MEM_PERSIST_RELAXED  which  means  the  persist  operation will be done
38       without any guarantees regarding atomicity of memory transfer.
39
40       The rpmem_deep_persist() function works in the same way  as  rpmem_per‐
41       sist(3)  function,  but  additionally it flushes the data to the lowest
42       possible  persistency  domain  available  from  software.   Please  see
43       pmem_deep_persist(3) for details.
44
45       The rpmem_read() function reads length bytes of data from a remote pool
46       at offset and copies it to the buffer buff.  The operation is performed
47       on  the  specified lane.  The lane must be less than the value returned
48       by rpmem_open(3) or rpmem_create(3) through the nlanes argument (so  it
49       can take a value from 0 to nlanes - 1).  The rpp must point to a remote
50       pool opened or created previously by rpmem_open(3) or rpmem_create(3).
51

RETURN VALUE

53       The rpmem_persist() function returns 0 if the entire  memory  area  was
54       made  persistent  on  the remote node.  Otherwise it returns a non-zero
55       value and sets errno appropriately.
56
57       The rpmem_read() function returns 0 if  the  data  was  read  entirely.
58       Otherwise it returns a non-zero value and sets errno appropriately.
59

SEE ALSO

61       rpmem_create(3),   rpmem_open(3),  rpmem_persist(3),  sysconf(3),  lim‐
62       its.conf(5), libpmemobj(7) and <http://pmem.io>
63
64
65
66PMDK - rpmem API version 1.2      2019-03-01                  RPMEM_PERSIST(3)
Impressum