The aim here is to address a problem reported by avg, where we
erroneously pause() after a scan in a situation where we should really
be continuing to scan the active queue in order to address a shortfall
of inactive pages. Consider an application with a read-only mapping of a
file several times the size of RAM, which is accessing blocks in a
random order. Most of the system's pages will end up in the active
queue, and during memory shortages we will end up pause()ing for a
second at a time in between scans. The pause() is intended to provide
time for laundering to complete, and is incorrect in this scenario.
Having a separate subroutine for active queue scans makes it easier for
the control loop to determine if the active queue scan met its target.
The change should not have any functional impact. I think the use of the
"pass" parameter doesn't make much sense anymore, and is incorrect
anyway since it never gets reset to 0 in the current code. I will
address this in a separate commit.