[PATCH] node local per-cpu-pages
[linux-3.10.git] / include / linux / mmzone.h
index 18fed8b679437ad66f475adb8d9d841e561c0b29..4733d35d8223bf847bc6b31ff7e705da8adb45ce 100644 (file)
@@ -63,6 +63,12 @@ struct per_cpu_pageset {
 #endif
 } ____cacheline_aligned_in_smp;
 
+#ifdef CONFIG_NUMA
+#define zone_pcp(__z, __cpu) ((__z)->pageset[(__cpu)])
+#else
+#define zone_pcp(__z, __cpu) (&(__z)->pageset[(__cpu)])
+#endif
+
 #define ZONE_DMA               0
 #define ZONE_NORMAL            1
 #define ZONE_HIGHMEM           2
@@ -122,8 +128,11 @@ struct zone {
         */
        unsigned long           lowmem_reserve[MAX_NR_ZONES];
 
+#ifdef CONFIG_NUMA
+       struct per_cpu_pageset  *pageset[NR_CPUS];
+#else
        struct per_cpu_pageset  pageset[NR_CPUS];
-
+#endif
        /*
         * free areas of different sizes
         */