This patch solves the following problem. When a large VS terminates, the node locks up. The node locks up because the page_scrub_kick routine sends a softirq to all processors instructing them to run the page scrub code. There they interfere with each other as they serialize behind the page_scrub_lock. The patch does two things: (1) In page_scrub_kick, only a single cpu is interrupted. Some cpu other than the calling cpu is chosen (if available) because we assume the calling cpu has other higher priority work to do. (2) In page_scrub_softirq, if more than one cpu is online, the first cpu to start scrubbing designates itself as the primary_scrubber. As such it is dedicated to scrubbing pages until the list is empty. Other cpus might call page_scrub_softirq but they spend only 1 msec scrubbing before returning to check for other higher priority work. But, with multiple cpus online, the node can afford to have one cpu dedicated to scrubbing when that work needs to be done. Signed-off-by: Robert Phillips <rphillips@virtualiron.com> Signed-off-by: Ben Guthro <bguthro@virtualiron.com>