table of contents
CXL_SET_PREFAULT_MODE(3) | CXL Programmer's Manual | CXL_SET_PREFAULT_MODE(3) |
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.
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_prefault_mode(3)
2017-05-24 | LIBCXL 1.5 |