diff options
author | 2011-01-13 15:45:43 -0800 | |
---|---|---|
committer | 2011-01-13 17:32:31 -0800 | |
commit | b44129b30652c8771db2265939bb8b463724043d (patch) | |
tree | d5b669ff4faea020b03e894706f49d5d1ae56907 /fs/fs-writeback.c | |
parent | mm: page allocator: adjust the per-cpu counter threshold when memory is low (diff) | |
download | linux-b44129b30652c8771db2265939bb8b463724043d.tar.gz linux-b44129b30652c8771db2265939bb8b463724043d.tar.bz2 linux-b44129b30652c8771db2265939bb8b463724043d.zip |
mm: vmstat: use a single setter function and callback for adjusting percpu thresholds
reduce_pgdat_percpu_threshold() and restore_pgdat_percpu_threshold() exist
to adjust the per-cpu vmstat thresholds while kswapd is awake to avoid
errors due to counter drift. The functions duplicate some code so this
patch replaces them with a single set_pgdat_percpu_threshold() that takes
a callback function to calculate the desired threshold as a parameter.
[akpm@linux-foundation.org: readability tweak]
[kosaki.motohiro@jp.fujitsu.com: set_pgdat_percpu_threshold(): don't use for_each_online_cpu]
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: Christoph Lameter <cl@linux.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fs-writeback.c')
0 files changed, 0 insertions, 0 deletions