On every invocation, fsflush flushes dirty file system pages over a certain age to disk.
On every invocation, fsflush examines a portion of memory and causes modified pages to be written to their backing store. Pages are written if they are modified and if they do not meet one of the following conditions:
Pages are kernel page
Pages are free
Pages are locked
Pages are associated with a swap device
Pages are currently involved in an I/O operation
The net effect is to flush pages from files that are mapped with mmap with write permission and that have actually been changed.
Pages are flushed to backing store but left attached to the process using them. This will simplify page reclamation when the system runs low on memory by avoiding delay for writing the page to backing store before claiming it, if the page has not been modified since the flush.
The following features are configurable:
Frequency of invocation (tune_t_fsflushr)
Whether memory scanning is executed (dopageflush)
Whether file system data flushing occurs (doiflush)
The frequency with which file system data flushing occurs (autoup)
For most systems, memory scanning and file system metadata synchronizing are the dominant activities for fsflush. Depending on system usage, memory scanning can be of little use or consume too much CPU time.