Skip to content

Commit

Permalink
Merge pull request #365 from pmem-bot/pmdk-master-docs-update
Browse files Browse the repository at this point in the history
pmdk: automatic docs update for 'master'
  • Loading branch information
janekmi authored Jul 24, 2023
2 parents e552f94 + 7314a75 commit 07c60ff
Show file tree
Hide file tree
Showing 43 changed files with 165 additions and 2,010 deletions.
30 changes: 10 additions & 20 deletions content/pmdk/manpages/linux/master/libpmem/libpmem.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ header: "pmem API version 1.1"
cc ... -lpmem
```



##### Library API versioning: #####

```c
Expand Down Expand Up @@ -75,17 +73,12 @@ results in the load/store, non-paged access to pmem.

This library is for applications that use persistent memory directly,
without the help of any library-supplied transactions or memory
allocation. Higher-level libraries that build on **libpmem** are
available and are recommended for most applications, see:
allocation. A higher-level library that relies on **libpmem** is available
and recommended for most applications, see:

+ **libpmemobj**(7), a general use persistent memory API, providing memory
allocation and transactional operations on variable-sized objects.

+ **libpmemblk**(7), providing pmem-resident arrays of fixed-sized blocks
with atomic updates.

+ **libpmemlog**(7), providing a pmem-resident log file.

Under normal usage, **libpmem** will never print messages or
intentionally cause the process to exit.
The only exception to this is the debugging information, when enabled,
Expand All @@ -110,8 +103,7 @@ the compile-time version information, supplied by defines in
**\<libpmem.h\>**, like this:

```c
reason = pmem_check_version(PMEM_MAJOR_VERSION,
PMEM_MINOR_VERSION);
reason = pmem_check_version(PMEM_MAJOR_VERSION, PMEM_MINOR_VERSION);
if (reason != NULL) {
/* version check failed, reason string tells you why */
}
Expand Down Expand Up @@ -153,8 +145,7 @@ pmem for some reason.
Unlike the other variables, the value of
**PMEM_IS_PMEM_FORCE** is not queried (and cached) at
library initialization time, but on the first call to
**pmem_is_pmem**(3). This means that in case of
**libpmemlog**(7), **libpmemblk**(7), and **libpmemobj**(7),
**pmem_is_pmem**(3). This means that in case of **libpmemobj**(7),
**PMEM_IS_PMEM_FORCE** may still be set or modified by the program
until the first attempt to create or open the persistent
memory pool.
Expand Down Expand Up @@ -254,11 +245,11 @@ that impact performance and never logs any trace information or performs any
run-time assertions.

A second version of **libpmem**, accessed when a program uses the libraries
under **/usr/lib/pmdk_debug**, contains run-time assertions and trace points. The
typical way to access the debug version is to set the environment variable
**LD_LIBRARY_PATH** to **/usr/lib/pmdk_debug** or **/usr/lib64/pmdk_debug**, as appropriate. Debugging output is
controlled using the following environment variables. These variables have
no effect on the non-debug version of the library.
under **/usr/lib/pmdk_debug**, contains run-time assertions and trace points.
The typical way to access the debug version is to set the environment variable
**LD_LIBRARY_PATH** to **/usr/lib/pmdk_debug** or **/usr/lib64/pmdk_debug**,
as appropriate. Debugging output is controlled using the following environment
variables. These variables have no effect on the non-debug version of the library.

+ **PMEM_LOG_LEVEL**

Expand Down Expand Up @@ -364,5 +355,4 @@ recommended by the SNIA NVM Programming Technical Work Group:
**dlclose**(3),
**pmem_flush**(3), **pmem_is_pmem**(3), **pmem_memmove_persist**(3),
**pmem_msync**(3), **pmem_persist**(3), **strerror**(3),
**libpmemblk**(7), **libpmemlog**(7), **libpmemobj**(7)
and **<https://pmem.io>**
**libpmemobj**(7) and **<https://pmem.io>**
4 changes: 1 addition & 3 deletions content/pmdk/manpages/linux/master/libpmem/pmem_flush.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,12 @@ else
/* ... */
```


>WARNING:
On Linux, **pmem_msync**() and **msync**(2) have no effect on memory ranges
**pmem_msync**() and **msync**(2) have no effect on memory ranges
mapped from Device DAX. In case of memory ranges where **pmem_is_pmem**(3)
returns true use **pmem_persist**() to force the changes to be stored durably
in persistent memory.


The **pmem_flush**() and **pmem_drain**() functions provide
partial versions of the **pmem_persist**() function.
**pmem_persist**() can be thought of as this:
Expand Down
6 changes: 2 additions & 4 deletions content/pmdk/manpages/linux/master/libpmem/pmem_is_pmem.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,11 @@ header: "pmem API version 1.1"
#include <libpmem.h>

int pmem_is_pmem(const void *addr, size_t len);
void *pmem_map_file(const char *path, size_t len, int flags,
mode_t mode, size_t *mapped_lenp, int *is_pmemp);
void *pmem_map_file(const char *path, size_t len, int flags, mode_t mode,
size_t *mapped_lenp, int *is_pmemp);
int pmem_unmap(void *addr, size_t len);
```
# DESCRIPTION #
Most pmem-aware applications will take advantage of higher level
Expand Down
24 changes: 9 additions & 15 deletions content/pmdk/manpages/linux/master/libpmem2/libpmem2.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,13 @@ results in the load/store, non-paged access to pmem.

This library is for applications that use persistent memory directly,
without the help of any library-supplied transactions or memory
allocation. Higher-level libraries that *currently* build on **libpmem**
(previous variation of libpmem2) are available and are recommended for
most applications, see:
allocation. A higher-level library that *currently* build on **libpmem**
(previous variation of libpmem2) is available and recommended
for most applications, see:

+ **libpmemobj**(7), a general use persistent memory API, providing memory
allocation and transactional operations on variable-sized objects.

+ **libpmemblk**(7), providing pmem-resident arrays of fixed-sized blocks
with atomic updates.

+ **libpmemlog**(7), providing a pmem-resident log file.

The **libpmem2** library provides a comprehensive set of functions for
robust use of Persistent Memory. It relies on three core concepts:
*struct pmem2_src source*, *struct pmem2_config config* and *struct pmem2_map map*:
Expand Down Expand Up @@ -238,11 +233,11 @@ that impact performance and never logs any trace information or performs any
run-time assertions.

A second version of **libpmem2**, accessed when a program uses the libraries
under **/usr/lib/pmdk_debug**, contains run-time assertions and trace points. The
typical way to access the debug version is to set the environment variable
**LD_LIBRARY_PATH** to **/usr/lib/pmdk_debug** or **/usr/lib64/pmdk_debug**, as appropriate. Debugging output is
controlled using the following environment variables. These variables have
no effect on the non-debug version of the library.
under **/usr/lib/pmdk_debug**, contains run-time assertions and trace points.
The typical way to access the debug version is to set the environment variable
**LD_LIBRARY_PATH** to **/usr/lib/pmdk_debug** or **/usr/lib64/pmdk_debug**,
as appropriate. Debugging output is controlled using the following environment
variables. These variables have no effect on the non-debug version of the library.

+ **PMEM2_LOG_LEVEL**

Expand Down Expand Up @@ -303,5 +298,4 @@ by the SNIA NVM Programming Technical Work Group:
**pmem2_get_persist_fn**(3),**pmem2_map_get_store_granularity**(3),
**pmem2_map_new**(3), **pmem2_source_from_anon**(3),
**pmem2_source_from_fd**(3), **libpmem2_unsafe_shutdown**(7),
**libpmemblk**(7), **libpmemlog**(7), **libpmemobj**(7)
and **<https://pmem.io>**
**libpmemobj**(7) and **<https://pmem.io>**
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ header: "pmem2 API version 1.0"
const char *pmem2_errormsg(void);
```
# DESCRIPTION #
If an error is detected during the call to a **libpmem2**(7) function, the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ the alignment required for specific *\*source*. Please see
the alignment required for specific *\*source*. Please see
**pmem2_source_alignment**(3).
* **PMEM2_E_SRC_DEVDAX_PRIVATE** - device DAX mapped with MAP_PRIVATE. (Linux only)
* **PMEM2_E_SRC_DEVDAX_PRIVATE** - device DAX mapped with MAP_PRIVATE.
* **PMEM2_E_ADDRESS_UNALIGNED** - when mapping device DAX to a virtual memory reservation
and the base mapping address (reservation address + reservation offset) is not aligned
to the device DAX granularity. Please see **pmem2_config_set_vm_reservation**(3). (Linux only)
to the device DAX granularity. Please see **pmem2_config_set_vm_reservation**(3).
* **PMEM2_E_ADDRESS_UNALIGNED** - when mapping to a virtual memory reservation and the region
for the mapping exceeds reservation size. Please see **pmem2_config_set_vm_reservation**(3).
Expand Down
2 changes: 0 additions & 2 deletions content/pmdk/manpages/linux/master/libpmem2/pmem2_perror.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ header: "pmem2 API version 1.0"
void pmem2_perror(const char *format, ...);
```
# DESCRIPTION #
The **pmem2_perror**() function produces a message on standard error stream describing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,8 @@ If the function fails, the *\*numa_node* variable is left unmodified and a negat
The **pmem2_source_numa_node**() can fail with the following errors:
On all systems:
* **PMEM2_E_NOSUPP** - source type or operating system not supported (see #caveats for details.)
on Linux:
* **PMEM2_E_DAX_REGION_NOT_FOUND** - no **ndctl_region** could be determined for the source.
* **PMEM2_E_INVALID_FILE_TYPE** - if the source points to a directory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ The **pmem2_source_size**() function retrieves the size of the file
in bytes pointed by file descriptor stored in the *source* and puts
it in *\*size*.
This function is a portable replacement for OS-specific APIs.
On Linux, it hides the quirkiness of Device DAX size detection.
This function hides the quirkiness of Device DAX size detection.
# RETURN VALUE #
Expand Down
Loading

0 comments on commit 07c60ff

Please sign in to comment.