From: Dimitri Sivanich Date: Mon, 28 Apr 2008 09:13:37 +0000 (-0700) Subject: vmstats: add cond_resched() to refresh_cpu_vm_stats() X-Git-Tag: v2.6.26-rc1~925 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=468fd62ed9090ccbe872489df5d0d099510df4b5;p=linux-2.6 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 Acked-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/vmstat.c b/mm/vmstat.c index 4c21670f8d..ec6035eda9 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -322,6 +322,7 @@ void refresh_cpu_vm_stats(int cpu) p->expire = 3; #endif } + cond_resched(); #ifdef CONFIG_NUMA /* * Deal with draining the remote pageset of this