Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109415
b: refs/heads/master
c: b954185
h: refs/heads/master
i:
  109413: eb8bdd1
  109411: 4eeff96
  109407: edd50a9
v: v3
  • Loading branch information
KOSAKI Motohiro authored and Linus Torvalds committed Sep 3, 2008
1 parent 12b750e commit a423701
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 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: 4b8561521dbaa3d766b198496b220e984e3bf756
refs/heads/master: b954185214c3b562c3fcc651e9ec69d421d76bfa
9 changes: 8 additions & 1 deletion trunk/mm/quicklist.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}

Expand Down

0 comments on commit a423701

Please sign in to comment.