Difference between revisions of "Cachectl Syscall"

From LinuxMIPS
Jump to: navigation, search
(Yeah, return values ...)
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== NAME ==
== NAME ==
'''cachectl''' - control cachebility of memory areas
'''cachectl''' - control cachebility of memory areas
Line 25: Line 26:
== See also ==
== See also ==
* [[Cacheflush syscall]]
* [[Cacheflush_Syscall]]
* [[syscall]]

Latest revision as of 08:06, 11 September 2012


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.

See also