The flashcache_setioctl command can be used to set/remove a process from flashcache blacklist/whitelist, or clear flashcache blacklist/whitelist.
flashcache_setioctl (-c | -a | -r) (-b pid |-w pid) ssd_devname
Add to blacklist/whitelist
Remove from blacklist/whitelist
Operate on blacklist
Operate on whitelist
FLASHCACHE CACHE POLICY
Flashcache can be put in one of 2 modes - Cache Everything or Cache Nothing (dev.flashcache.cache_all). The defaults is to "cache everything".
These 2 modes have a blacklist and a whitelist.
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().
The algorithm works as follows :
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'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.
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.