Cachectl Syscall

From LinuxMIPS
Revision as of 11:15, 25 June 2005 by Ralf (talk | contribs) (Document cachectl(2) syscall)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


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


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.

See also