kernel - SWAP CACHE part 12/many - Add swapcache cleanup state
* Add a small state machine and hysteresis to flip between swapcache
writing and swapcache cleaning. The swapcache is written to until
(unless) it hits 75% use. If this occurs it switches to cleaning
mode to get rid of swapcache pages until it gets down to 70%. While
in cleaning mode burst accumulation still occurs. Then it flips back.
Currently the cleaning mode tries to choose swap meta-blocks which
are wholely swapped (have no VM pages), running linearly through
the VM object list in order to try to clean contiguous areas of
the swapcache. The idea is to reduce fragmentation that would lead
to excessive disk seeking. At the same time the limited cleaning
run (only 5% of the swap cache) should prevent any large-scale
excessive deletion of the swapcache.
* Add a new VM object type, OBJT_MARKER, which may be used by iterators
running through the vm_object_list.