提交 737af4c0 编写于 作者: C Cody P Schafer 提交者: Linus Torvalds

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: NCody 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: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 56cef2b8
...@@ -6098,11 +6098,9 @@ void free_contig_range(unsigned long pfn, unsigned nr_pages) ...@@ -6098,11 +6098,9 @@ void free_contig_range(unsigned long pfn, unsigned nr_pages)
void __meminit zone_pcp_update(struct zone *zone) void __meminit zone_pcp_update(struct zone *zone)
{ {
unsigned cpu; unsigned cpu;
unsigned long batch;
mutex_lock(&pcp_batch_high_lock); mutex_lock(&pcp_batch_high_lock);
batch = zone_batchsize(zone);
for_each_possible_cpu(cpu) for_each_possible_cpu(cpu)
pageset_set_batch(per_cpu_ptr(zone->pageset, cpu), batch); zone_pageset_init(zone, cpu);
mutex_unlock(&pcp_batch_high_lock); mutex_unlock(&pcp_batch_high_lock);
} }
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册