cachectl - control cachebility of memory areas
#include <sys/cachectl.h> int cachectl (void *addr, size_t nbytes, int op);
The cachectl syscall allows a process to control cachebility of it's address space at page granularity. Cachability is initially choosen by a heuristc at mmap mmap time. The op parameter may be one of:
- Make the indicated area cacheable
- Make the indicated area uncacheable
- the op argument was none of CACHABLE and UNCACHEABLE or was not acceptable due to special hardware constraints or the address range specified by addr and nbytes was not page aligned.
A cachectl syscall appeared in RISC/OS and later in IRIX. It differs in taking an int for the nbytes argument.
Even though the syscall is part of the kernel's syscall interface since the earliest days of Linux it has never actually been implemented since the defaults used by mmap seem to work sufficiently well.