Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198266
b: refs/heads/master
c: 319774e
h: refs/heads/master
v: v3
  • Loading branch information
Wu Fengguang authored and Linus Torvalds committed May 25, 2010
1 parent aab75ba commit 77e9683
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0faa56389c793cda7f967117415717bbab24fe4e
refs/heads/master: 319774e25fa4b7641bdc3b0a464dd84e62103347
37 changes: 20 additions & 17 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3292,31 +3292,34 @@ static void setup_pagelist_highmark(struct per_cpu_pageset *p,
pcp->batch = PAGE_SHIFT * 8;
}

static __meminit void setup_zone_pageset(struct zone *zone)
{
int cpu;

zone->pageset = alloc_percpu(struct per_cpu_pageset);

for_each_possible_cpu(cpu) {
struct per_cpu_pageset *pcp = per_cpu_ptr(zone->pageset, cpu);

setup_pageset(pcp, zone_batchsize(zone));

if (percpu_pagelist_fraction)
setup_pagelist_highmark(pcp,
(zone->present_pages /
percpu_pagelist_fraction));
}
}

/*
* Allocate per cpu pagesets and initialize them.
* Before this call only boot pagesets were available.
* Boot pagesets will no longer be used by this processorr
* after setup_per_cpu_pageset().
*/
void __init setup_per_cpu_pageset(void)
{
struct zone *zone;
int cpu;

for_each_populated_zone(zone) {
zone->pageset = alloc_percpu(struct per_cpu_pageset);

for_each_possible_cpu(cpu) {
struct per_cpu_pageset *pcp = per_cpu_ptr(zone->pageset, cpu);

setup_pageset(pcp, zone_batchsize(zone));

if (percpu_pagelist_fraction)
setup_pagelist_highmark(pcp,
(zone->present_pages /
percpu_pagelist_fraction));
}
}
for_each_populated_zone(zone)
setup_zone_pageset(zone);
}

static noinline __init_refok
Expand Down

0 comments on commit 77e9683

Please sign in to comment.