Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33751
b: refs/heads/master
c: a302eb4
h: refs/heads/master
i:
  33749: a24db95
  33747: bfddd54
  33743: 8d69430
v: v3
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Sep 1, 2006
1 parent 611e93e commit 2d9abd9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 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: b63fe1ba4409774738c971d4e6f0b12b54cc2c65
refs/heads/master: a302eb4e4602d6444ae75a0e516fb2f2c62d6642
20 changes: 5 additions & 15 deletions trunk/mm/vmstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ static void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
(*p)++;

if (unlikely(*p > STAT_THRESHOLD)) {
zone_page_state_add(*p, zone, item);
*p = 0;
zone_page_state_add(*p + STAT_THRESHOLD / 2, zone, item);
*p = -STAT_THRESHOLD / 2;
}
}

Expand All @@ -209,8 +209,8 @@ void __dec_zone_page_state(struct page *page, enum zone_stat_item item)
(*p)--;

if (unlikely(*p < -STAT_THRESHOLD)) {
zone_page_state_add(*p, zone, item);
*p = 0;
zone_page_state_add(*p - STAT_THRESHOLD / 2, zone, item);
*p = STAT_THRESHOLD /2;
}
}
EXPORT_SYMBOL(__dec_zone_page_state);
Expand Down Expand Up @@ -239,19 +239,9 @@ EXPORT_SYMBOL(inc_zone_page_state);
void dec_zone_page_state(struct page *page, enum zone_stat_item item)
{
unsigned long flags;
struct zone *zone;
s8 *p;

zone = page_zone(page);
local_irq_save(flags);
p = diff_pointer(zone, item);

(*p)--;

if (unlikely(*p < -STAT_THRESHOLD)) {
zone_page_state_add(*p, zone, item);
*p = 0;
}
__dec_zone_page_state(page, item);
local_irq_restore(flags);
}
EXPORT_SYMBOL(dec_zone_page_state);
Expand Down

0 comments on commit 2d9abd9

Please sign in to comment.