summaryrefslogtreecommitdiff
path: root/mm/quicklist.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-09-14 19:26:53 +0400
committerIngo Molnar <mingo@elte.hu>2008-09-14 19:26:53 +0400
commitf81b691a3df09806385ea413c3a2ee094c705ca3 (patch)
tree01c0d6d319fcbddc98171d06cfe8e742cd270455 /mm/quicklist.c
parent110e0358e7dfd9cc56d47077068f3680dae10b56 (diff)
parentadee14b2e1557d0a8559f29681732d05a89dfc35 (diff)
downloadlinux-f81b691a3df09806385ea413c3a2ee094c705ca3.tar.xz
Merge commit 'v2.6.27-rc6' into x86/pat
Diffstat (limited to 'mm/quicklist.c')
-rw-r--r--mm/quicklist.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/mm/quicklist.c b/mm/quicklist.c
index 3f703f7cb398..8dbb6805ef35 100644
--- a/mm/quicklist.c
+++ b/mm/quicklist.c
@@ -26,7 +26,10 @@ DEFINE_PER_CPU(struct quicklist, quicklist)[CONFIG_NR_QUICK];
static unsigned long max_pages(unsigned long min_pages)
{
unsigned long node_free_pages, max;
- struct zone *zones = NODE_DATA(numa_node_id())->node_zones;
+ int node = numa_node_id();
+ struct zone *zones = NODE_DATA(node)->node_zones;
+ int num_cpus_on_node;
+ node_to_cpumask_ptr(cpumask_on_node, node);
node_free_pages =
#ifdef CONFIG_ZONE_DMA
@@ -38,6 +41,10 @@ static unsigned long max_pages(unsigned long min_pages)
zone_page_state(&zones[ZONE_NORMAL], NR_FREE_PAGES);
max = node_free_pages / FRACTION_OF_NODE_MEM;
+
+ num_cpus_on_node = cpus_weight_nr(*cpumask_on_node);
+ max /= num_cpus_on_node;
+
return max(max, min_pages);
}