vmscan: cleanup the scan batching code

The vmscan batching logic is twisting.  Move it into a standalone function
nr_scan_try_batch() and document it.  No behavior change.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Acked-by: Rik van Riel <riel@redhat.com>
Cc: Nick Piggin <npiggin@suse.de>
Cc: Christoph Lameter <cl@linux-foundation.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Wu Fengguang
2009-06-16 15:32:29 -07:00
committed by Linus Torvalds
parent 56e49d2188
commit 6e08a369ee
4 changed files with 35 additions and 18 deletions

View File

@ -718,10 +718,10 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
low_wmark_pages(zone),
high_wmark_pages(zone),
zone->pages_scanned,
zone->lru[LRU_ACTIVE_ANON].nr_scan,
zone->lru[LRU_INACTIVE_ANON].nr_scan,
zone->lru[LRU_ACTIVE_FILE].nr_scan,
zone->lru[LRU_INACTIVE_FILE].nr_scan,
zone->lru[LRU_ACTIVE_ANON].nr_saved_scan,
zone->lru[LRU_INACTIVE_ANON].nr_saved_scan,
zone->lru[LRU_ACTIVE_FILE].nr_saved_scan,
zone->lru[LRU_INACTIVE_FILE].nr_saved_scan,
zone->spanned_pages,
zone->present_pages);