diff options
author | Dimitri Sivanich <sivanich@sgi.com> | 2008-04-28 05:13:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:26 -0400 |
commit | 468fd62ed9090ccbe872489df5d0d099510df4b5 (patch) | |
tree | 017ab340cac72bf86423f181f085e7bc39fd70ea /mm | |
parent | 8cece85ec744bdc7ea0fc2d33f65b3f031c28468 (diff) |
vmstats: add cond_resched() to refresh_cpu_vm_stats()
We've found that it can take quite a bit of time (100's of usec) to get
through the zone loop in refresh_cpu_vm_stats().
Adding a cond_resched() to allow other threads to run in the non-preemptive
case.
Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
Acked-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/vmstat.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c index 4c21670f8d91..ec6035eda933 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c | |||
@@ -322,6 +322,7 @@ void refresh_cpu_vm_stats(int cpu) | |||
322 | p->expire = 3; | 322 | p->expire = 3; |
323 | #endif | 323 | #endif |
324 | } | 324 | } |
325 | cond_resched(); | ||
325 | #ifdef CONFIG_NUMA | 326 | #ifdef CONFIG_NUMA |
326 | /* | 327 | /* |
327 | * Deal with draining the remote pageset of this | 328 | * Deal with draining the remote pageset of this |