diff options
author | Cody P Schafer <cody@linux.vnet.ibm.com> | 2013-07-03 18:01:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 19:07:27 -0400 |
commit | 737af4c0110fc69a81dc7464a74a4113f7645255 (patch) | |
tree | adb8ab780e0307d823b4dfe3a8c99d9ca7be4e6d /mm | |
parent | 56cef2b85c28d81efd39f2eeaddce28678756fe3 (diff) |
mm/page_alloc: in zone_pcp_update(), uze zone_pageset_init()
Previously, zone_pcp_update() called pageset_set_batch() directly,
essentially assuming that percpu_pagelist_fraction == 0.
Correct this by calling zone_pageset_init(), which chooses the
appropriate ->batch and ->high calculations.
Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Cc: Gilad Ben-Yossef <gilad@benyossef.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Pekka Enberg <penberg@kernel.org>
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/page_alloc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index ee6fe7faabad..c7344d17660b 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -6098,11 +6098,9 @@ void free_contig_range(unsigned long pfn, unsigned nr_pages) | |||
6098 | void __meminit zone_pcp_update(struct zone *zone) | 6098 | void __meminit zone_pcp_update(struct zone *zone) |
6099 | { | 6099 | { |
6100 | unsigned cpu; | 6100 | unsigned cpu; |
6101 | unsigned long batch; | ||
6102 | mutex_lock(&pcp_batch_high_lock); | 6101 | mutex_lock(&pcp_batch_high_lock); |
6103 | batch = zone_batchsize(zone); | ||
6104 | for_each_possible_cpu(cpu) | 6102 | for_each_possible_cpu(cpu) |
6105 | pageset_set_batch(per_cpu_ptr(zone->pageset, cpu), batch); | 6103 | zone_pageset_init(zone, cpu); |
6106 | mutex_unlock(&pcp_batch_high_lock); | 6104 | mutex_unlock(&pcp_batch_high_lock); |
6107 | } | 6105 | } |
6108 | #endif | 6106 | #endif |