Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22425
b: refs/heads/master
c: b40607f
h: refs/heads/master
i:
  22423: a450c9b
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Mar 22, 2006
1 parent 36b4e15 commit 3eacfa1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 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: 68ed0040a8c9d06b73cda322a1f740749bd6e41a
refs/heads/master: b40607fc02f8248828d52d88f91b7d68df1933b0
20 changes: 9 additions & 11 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1214,24 +1214,22 @@ DEFINE_PER_CPU(long, nr_pagecache_local) = 0;

static void __get_page_state(struct page_state *ret, int nr, cpumask_t *cpumask)
{
int cpu = 0;
unsigned cpu;

memset(ret, 0, nr * sizeof(unsigned long));
cpus_and(*cpumask, *cpumask, cpu_online_map);

cpu = first_cpu(*cpumask);
while (cpu < NR_CPUS) {
unsigned long *in, *out, off;

if (!cpu_isset(cpu, *cpumask))
continue;
for_each_cpu_mask(cpu, *cpumask) {
unsigned long *in;
unsigned long *out;
unsigned off;
unsigned next_cpu;

in = (unsigned long *)&per_cpu(page_states, cpu);

cpu = next_cpu(cpu, *cpumask);

if (likely(cpu < NR_CPUS))
prefetch(&per_cpu(page_states, cpu));
next_cpu = next_cpu(cpu, *cpumask);
if (likely(next_cpu < NR_CPUS))
prefetch(&per_cpu(page_states, next_cpu));

out = (unsigned long *)ret;
for (off = 0; off < nr; off++)
Expand Down

0 comments on commit 3eacfa1

Please sign in to comment.