.\" Automatically generated by Pandoc 1.17.2 .\" .TH "FLASHCACHE_SETIOCTL" "8" "October 2012" "flashcache_setioctl" "" .hy .SH NAME .PP flashcache_setioctl \- Set I/O behavior for special process in flashcache .SH DESCRIPTION .PP The \f[B]flashcache_setioctl\f[] command can be used to set/remove a process from flashcache blacklist/whitelist, or clear flashcache blacklist/whitelist. .SH SYNOPSIS .PP flashcache_setioctl (\-c | \-a | \-r) (\-b \f[I]pid\f[] |\-w \f[I]pid\f[]) \f[I]ssd_devname\f[] .SH OPTIONS .TP .B \-c Clear blacklist/whitelist .RS .RE .TP .B \-a Add to blacklist/whitelist .RS .RE .TP .B \-r Remove from blacklist/whitelist .RS .RE .TP .B \-b Operate on blacklist .RS .RE .TP .B \-w Operate on whitelist .RS .RE .SH FLASHCACHE CACHE POLICY .PP Flashcache can be put in one of 2 modes \- Cache Everything or Cache Nothing (dev.flashcache.cache_all). The defaults is to "cache everything". .PP These 2 modes have a blacklist and a whitelist. .PP The tgid (thread group id) for a group of pthreads can be used as a shorthand to tag all threads in an application. The tgid for a pthread is returned by getpid() and the pid of the individual thread is returned by gettid(). .PP The algorithm works as follows : .PP In "cache everything" mode, 1) If the pid of the process issuing the IO is in the blacklist, do not cache the IO. ELSE, 2) If the tgid is in the blacklist, don\[aq]t cache this IO. UNLESS 3) The particular pid is marked as an exception (and entered in the whitelist, which makes the IO cacheable). 4) Finally, even if IO is cacheable up to this point, skip sequential IO if configured by the sysctl. .PP Conversely, in "cache nothing" mode, 1) If the pid of the process issuing the IO is in the whitelist, cache the IO. ELSE, 2) If the tgid is in the whitelist, cache this IO. UNLESS 3) The particular pid is marked as an exception (and entered in the blacklist, which makes the IO non\-cacheable). 4) Anything whitelisted is cached, regardless of sequential or random IO. .SH SEE ALSO .PP \f[C]flashcache_create\f[](8) .PP \f[I]README\f[] and other documents in \f[B]/usr/share/doc/flashcache\-utils\f[] .PP The flashcache source code and all documentation may be downloaded from . .SH AUTHORS .PP Flashcache is developed by Mohan Srinivasan .PP This man page was written by Liang Guo for Debian GNU/Linux (but may be used by others).