NAME¶
cxl_set_prefault_mode - set the mode for prefaulting segments
SYNOPSIS¶
#include <libcxl.h>
int cxl_set_prefault_mode(struct cxl_afu_h
*afu, enum cxl_prefault_mode value);
DESCRIPTION¶
cxl_set_prefault_mode() sets the prefault mode of afu to
value. The current mode will be used for prefaulting in segments into
the segment table when performing cxl_afu_attach(),
cxl_afu_attach_full() or cxl_afu_attach_work(). Mode must be one
of the enum cxl_prefault_mode values:
- CXL_PREFAULT_MODE_NONE
- No prefaulting (default).
- CXL_PREFAULT_MODE_WED
- Treat the work element descriptor as an effective address and prefault
what it points to.
- CXL_PREFAULT_MODE_ALL
- Prefault all the segments mapped by the process calling
cxl_afu_attach().
RETURN VALUE¶
On success, 0 is returned. On error, -1 is returned and errno is set
appropriately.
ERRORS¶
- EINVAL
- Invalid argument value.