diff options
| author | Jeff Garzik <jgarzik@pobox.com> | 2006-02-09 00:58:59 -0500 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-09 00:58:59 -0500 |
| commit | cac0e8e8bb2e7a086643bdd00c41d900a79bb4fa (patch) | |
| tree | 73cd85e5529a01fa2338ab6d58b99c36dd666cbe /mm/page_alloc.c | |
| parent | ddef9bb367b19383df627e388cb4c01c86ddba6c (diff) | |
| parent | 0bdd340c092b0936f78a54bdbd3927463ed4fca3 (diff) | |
Merge branch 'master'
Diffstat (limited to 'mm/page_alloc.c')
| -rw-r--r-- | mm/page_alloc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 44b4eb4202d9..dde04ff4be31 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
| @@ -1213,18 +1213,21 @@ static void __get_page_state(struct page_state *ret, int nr, cpumask_t *cpumask) | |||
| 1213 | { | 1213 | { |
| 1214 | int cpu = 0; | 1214 | int cpu = 0; |
| 1215 | 1215 | ||
| 1216 | memset(ret, 0, sizeof(*ret)); | 1216 | memset(ret, 0, nr * sizeof(unsigned long)); |
| 1217 | cpus_and(*cpumask, *cpumask, cpu_online_map); | 1217 | cpus_and(*cpumask, *cpumask, cpu_online_map); |
| 1218 | 1218 | ||
| 1219 | cpu = first_cpu(*cpumask); | 1219 | cpu = first_cpu(*cpumask); |
| 1220 | while (cpu < NR_CPUS) { | 1220 | while (cpu < NR_CPUS) { |
| 1221 | unsigned long *in, *out, off; | 1221 | unsigned long *in, *out, off; |
| 1222 | 1222 | ||
| 1223 | if (!cpu_isset(cpu, *cpumask)) | ||
| 1224 | continue; | ||
| 1225 | |||
| 1223 | in = (unsigned long *)&per_cpu(page_states, cpu); | 1226 | in = (unsigned long *)&per_cpu(page_states, cpu); |
| 1224 | 1227 | ||
| 1225 | cpu = next_cpu(cpu, *cpumask); | 1228 | cpu = next_cpu(cpu, *cpumask); |
| 1226 | 1229 | ||
| 1227 | if (cpu < NR_CPUS) | 1230 | if (likely(cpu < NR_CPUS)) |
| 1228 | prefetch(&per_cpu(page_states, cpu)); | 1231 | prefetch(&per_cpu(page_states, cpu)); |
| 1229 | 1232 | ||
| 1230 | out = (unsigned long *)ret; | 1233 | out = (unsigned long *)ret; |
| @@ -1886,8 +1889,7 @@ static void setup_pagelist_highmark(struct per_cpu_pageset *p, | |||
| 1886 | * not check if the processor is online before following the pageset pointer. | 1889 | * not check if the processor is online before following the pageset pointer. |
| 1887 | * Other parts of the kernel may not check if the zone is available. | 1890 | * Other parts of the kernel may not check if the zone is available. |
| 1888 | */ | 1891 | */ |
| 1889 | static struct per_cpu_pageset | 1892 | static struct per_cpu_pageset boot_pageset[NR_CPUS]; |
| 1890 | boot_pageset[NR_CPUS]; | ||
| 1891 | 1893 | ||
| 1892 | /* | 1894 | /* |
| 1893 | * Dynamically allocate memory for the | 1895 | * Dynamically allocate memory for the |
