Scroll to navigation

CXL_GET_PREFAULT_MODE(3) CXL Programmer's Manual CXL_GET_PREFAULT_MODE(3)

NAME

cxl_get_prefault_mode - get the mode for prefaulting segments

SYNOPSIS

#include <libcxl.h>

int cxl_get_prefault_mode(struct cxl_afu_h *afu, enum cxl_prefault_mode *valp);

DESCRIPTION

cxl_get_prefault_mode() gets the current mode used for prefaulting in segments into the segment table when performing cxl_afu_attach(). The prefault_mode of afu is copied to the long integer pointed to by valp. Mode will be one of the enum cxl_prefault_mode values:

No prefaulting (default).
Treat the work element descriptor as an effective address and prefault what it points to.
Prefault all the segments mapped by the process calling cxl_afu_attach(), cxl_afu_attach_full() or cxl_afu_attach_work().

RETURN VALUE

On success, 0 is returned. On error, -1 is returned and errno is set appropriately.

ERRORS

Invalid argument value.
Insufficient memory.

SEE ALSO

cxl(3), cxl_adapter_afu_next(3), cxl_afu_attach(3), cxl_afu_attach_full(3), cxl_afu_attach_work(3), cxl_afu_next(3), cxl_get_api_version(3), cxl_get_api_version_compatible(3), cxl_get_irqs_max(3), cxl_get_irqs_min(3), cxl_get_mode(3), cxl_get_modes_supported(3), cxl_set_prefault_mode(3)

2017-05-24 LIBCXL 1.5