Re: NUMA but not SMP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 5 Jul 2006, Luck, Tony wrote:

> IA64 allows NUMA to be set without SMP ... in fact you
> end up with this when trying to build a "generic UP" kernel
> since CONFIG_IA64_GENERIC selects NUMA, and won't let you
> unselect it.
> 
> Suddenly this is a problem.  Generic UP kernel fails to build
> with an "Undefined: __inc_zone_state", which shows up because
> the __inc_zone_state function is defined inside some #if SMP
> code, but used inside some #if NUMA code in mm/vmstat.c

My fault. Does this fix it:

Index: linux-2.6/include/linux/vmstat.h
===================================================================
--- linux-2.6.orig/include/linux/vmstat.h	2006-07-06 10:41:34.000000000 -0700
+++ linux-2.6/include/linux/vmstat.h	2006-07-06 10:45:45.000000000 -0700
@@ -186,11 +186,16 @@ static inline void __mod_zone_page_state
 	zone_page_state_add(delta, zone, item);
 }
 
+static 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,
-
: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Sparc Linux]     [DCCP]     [Linux ARM]     [Yosemite News]     [Linux SCSI]     [Linux x86_64]     [Linux for Ham Radio]

  Powered by Linux