Skip to content

Commit

Permalink
vmstats: add cond_resched() to refresh_cpu_vm_stats()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dimitri Sivanich authored and torvalds committed Apr 28, 2008
1 parent 8cece85 commit 468fd62
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mm/vmstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 468fd62

Please sign in to comment.