vmstat: small revisions to refresh_cpu_vm_stats()
authorChristoph Lameter <clameter@sgi.com>
Tue, 5 Feb 2008 06:29:16 +0000 (22:29 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 5 Feb 2008 17:44:18 +0000 (09:44 -0800)
commita7f75e25860ac0a7b70cf6e14c37618d2d2bb890
tree12f651d69e72159c6f904e007973874e912853bb
parent08e7d9b557299ba6ce57165ce8df310780bd681c
vmstat: small revisions to refresh_cpu_vm_stats()

1. Add comments explaining how the function can be called.

2. Collect global diffs in a local array and only spill
   them once into the global counters when the zone scan
   is finished. This means that we only touch each global
   counter once instead of each time we fold cpu counters
   into zone counters.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/vmstat.c