Skip to content

Commit 468fd62

Browse files
Dimitri Sivanichtorvalds
authored andcommitted
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 <[email protected]> Acked-by: Christoph Lameter <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 8cece85 commit 468fd62

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mm/vmstat.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ void refresh_cpu_vm_stats(int cpu)
322322
p->expire = 3;
323323
#endif
324324
}
325+
cond_resched();
325326
#ifdef CONFIG_NUMA
326327
/*
327328
* Deal with draining the remote pageset of this

0 commit comments

Comments
 (0)