pmemset API version 1.0

The PMDK repository on GitHub is the ultimate source of information on PMDK from release 2.0! For all questions and to submit eventual issues please follow to that repository. The PMDK documentation collected here should be valid up to the 1.13.1 release but is maintained only on a best-effort basis and may not reflect the latest state of the art.

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
SEE ALSO

NAME

pmemset_set_contiguous_part_coalescing() - set part coalescing feature in the pmemset

SYNOPSIS

#include <libpmemset.h>

enum pmemset_coalescing;
struct pmemset;

int pmemset_set_contiguous_part_coalescing(struct pmemset *set,
		enum pmemset_coalescing value);

DESCRIPTION

The pmemset_set_contiguous_part_coalescing() sets part coalescing feature flag in pmemset to the provided value. The possible values are PMEMSET_COALESCING_NONE, PMEMSET_COALESCING_OPPORTUNISTIC and PMEMSET_COALESCING_FULL.

When part coalescing is enabled, the pmemset_map(3) function will try to coalesce each new mapped part with the previously mapped part, that means it will try to map the part directly after the previous mapping. The behavior of part mapping can be changed by setting one of possible values in pmemset:

  • PMEMSET_COALESCING_NONE - default behavior, no new mapped part will be coalesced, the position of each mapped part in virtual address space is chosen arbitrarily by the operating system

  • PMEMSET_COALESCING_OPPORTUNISTIC - each new mapped part will possibly be coalesced but if it’s not possible it will be handled like with PMEMSET_COALESCING_NONE value set

  • PMEMSET_COALESCING_FULL - each new mapped part will be coalesced, if it’s not possible the mapping will fail

Mapping parts contiguously allows modifying the virtual address space of multiple parts with one operation using for example memset(3). The success of the part coalescing depends on the operating system and is not guaranteed. For more information see pmemset_map(3).

Coalesced parts appear as single struct pmemset_part_map and can be retrieved by iterating over the pmemset using pmemset_first_part_map(3) and pmemset_next_part_map(3) or simply by retrieving part by its mapping address with pmemset_part_map_by_address(3) function.

RETURN VALUE

The pmemset_set_contiguous_part_coalescing() function returns 0 on success or a negative error code on failure.

ERRORS

The pmemset_set_contiguous_part_coalescing() can fail with the following errors:

  • PMEMSET_E_INVALID_COALESCING_VALUE - contiguous part coalescing value not one of the possible values.

SEE ALSO

pmemset_first_part_map(3), pmemset_map(3), pmemset_next_part_map(3), pmemset_part_map_by_address(3), libpmemset(7) and http://pmem.io

The contents of this web site and the associated GitHub repositories are BSD-licensed open source.