Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26703
b: refs/heads/master
c: ac924c6
h: refs/heads/master
i:
  26701: a506567
  26699: 1296c40
  26695: 47af307
  26687: 2d546db
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed May 15, 2006
1 parent 47098bf commit 635d11b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: 5afdbd6e84c7fbdaa7cfde4cbee0d3a5f4f56da2
refs/heads/master: ac924c6034d9095f95ee889f7e31bbb9145da0c2
11 changes: 7 additions & 4 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <linux/mempolicy.h>

#include <asm/tlbflush.h>
#include <asm/div64.h>
#include "internal.h"

/*
Expand Down Expand Up @@ -2566,9 +2567,11 @@ void setup_per_zone_pages_min(void)
}

for_each_zone(zone) {
unsigned long tmp;
u64 tmp;

spin_lock_irqsave(&zone->lru_lock, flags);
tmp = (pages_min * zone->present_pages) / lowmem_pages;
tmp = (u64)pages_min * zone->present_pages;
do_div(tmp, lowmem_pages);
if (is_highmem(zone)) {
/*
* __GFP_HIGH and PF_MEMALLOC allocations usually don't
Expand All @@ -2595,8 +2598,8 @@ void setup_per_zone_pages_min(void)
zone->pages_min = tmp;
}

zone->pages_low = zone->pages_min + tmp / 4;
zone->pages_high = zone->pages_min + tmp / 2;
zone->pages_low = zone->pages_min + (tmp >> 2);
zone->pages_high = zone->pages_min + (tmp >> 1);
spin_unlock_irqrestore(&zone->lru_lock, flags);
}

Expand Down

0 comments on commit 635d11b

Please sign in to comment.