Skip to content

Commit

Permalink
[PATCH] ZVC: add __inc_zone_state for !SMP configuration
Browse files Browse the repository at this point in the history
It turns out that there is a way to build a kernel with NUMA and no SMP.
In that case we are missing one definition __inc_zone_state.

Provide that missing __inc_zone_state.

(akpm: NUMA && !SMP sounds odd, but I am told "But there is the concept of
cpuless nodes.  A NUMA system without SMP has a single processor but multiple
memory nodes.  This used to work before on IA64 (wasn't aware of it, never seen
anyone with this kind of thing).")

Acked-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Jul 10, 2006
1 parent 06a9ec2 commit 7f4599e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions include/linux/vmstat.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,16 @@ static inline void __mod_zone_page_state(struct zone *zone,
zone_page_state_add(delta, zone, item);
}

static inline void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
{
atomic_long_inc(&zone->vm_stat[item]);
atomic_long_inc(&vm_stat[item]);
}

static inline void __inc_zone_page_state(struct page *page,
enum zone_stat_item item)
{
atomic_long_inc(&page_zone(page)->vm_stat[item]);
atomic_long_inc(&vm_stat[item]);
__inc_zone_state(page_zone(page), item);
}

static inline void __dec_zone_page_state(struct page *page,
Expand Down

0 comments on commit 7f4599e

Please sign in to comment.