This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / mm / page_alloc.c
index 6708f4f..f2fbdc4 100644 (file)
@@ -31,6 +31,8 @@
 #include <linux/topology.h>
 #include <linux/sysctl.h>
 #include <linux/cpu.h>
+#include <linux/vs_base.h>
+#include <linux/vs_limit.h>
 
 #include <asm/tlbflush.h>
 
@@ -279,6 +281,8 @@ void __free_pages_ok(struct page *page, unsigned int order)
        LIST_HEAD(list);
        int i;
 
+       arch_free_page(page, order);
+
        mod_page_state(pgfree, 1 << order);
        for (i = 0 ; i < (1 << order) ; ++i)
                free_pages_check(__FUNCTION__, page + i);
@@ -509,6 +513,8 @@ static void fastcall free_hot_cold_page(struct page *page, int cold)
        struct per_cpu_pages *pcp;
        unsigned long flags;
 
+       arch_free_page(page, 0);
+
        kernel_map_pages(page, 1, 0);
        inc_page_state(pgfree);
        free_pages_check(__FUNCTION__, page);
@@ -825,6 +831,17 @@ unsigned int nr_free_pages(void)
 
 EXPORT_SYMBOL(nr_free_pages);
 
+unsigned int nr_used_zone_pages(void)
+{
+       unsigned int pages = 0;
+       struct zone *zone;
+
+       for_each_zone(zone)
+               pages += zone->nr_active + zone->nr_inactive;
+
+       return pages;
+}
+
 #ifdef CONFIG_NUMA
 unsigned int nr_free_pages_pgdat(pg_data_t *pgdat)
 {
@@ -994,6 +1011,8 @@ void si_meminfo(struct sysinfo *val)
        val->freehigh = 0;
 #endif
        val->mem_unit = PAGE_SIZE;
+       if (vx_flags(VXF_VIRT_MEM, 0))
+               vx_vsi_meminfo(val);
 }
 
 EXPORT_SYMBOL(si_meminfo);
@@ -1370,7 +1389,7 @@ static void __init calculate_zone_totalpages(struct pglist_data *pgdat,
                for (i = 0; i < MAX_NR_ZONES; i++)
                        realtotalpages -= zholes_size[i];
        pgdat->node_present_pages = realtotalpages;
-       printk(KERN_DEBUG "On node %d totalpages: %lu\n", pgdat->node_id, realtotalpages);
+       printk("On node %d totalpages: %lu\n", pgdat->node_id, realtotalpages);
 }
 
 
@@ -1391,7 +1410,7 @@ void __init memmap_init_zone(struct page *start, unsigned long size, int nid,
                INIT_LIST_HEAD(&page->lru);
 #ifdef WANT_PAGE_VIRTUAL
                /* The shift won't overflow because ZONE_NORMAL is below 4G. */
-               if (!is_highmem_idx(zone))
+               if (!is_highmem(zone))
                        set_page_address(page, __va(start_pfn << PAGE_SHIFT));
 #endif
                start_pfn++;
@@ -1476,7 +1495,7 @@ static void __init free_area_init_core(struct pglist_data *pgdat,
                        pcp->batch = 1 * batch;
                        INIT_LIST_HEAD(&pcp->list);
                }
-               printk(KERN_DEBUG "  %s zone: %lu pages, LIFO batch:%lu\n",
+               printk("  %s zone: %lu pages, LIFO batch:%lu\n",
                                zone_names[j], realsize, batch);
                INIT_LIST_HEAD(&zone->active_list);
                INIT_LIST_HEAD(&zone->inactive_list);
@@ -1955,9 +1974,9 @@ module_init(init_per_zone_pages_min)
  *     changes.
  */
 int min_free_kbytes_sysctl_handler(ctl_table *table, int write, 
-               struct file *file, void __user *buffer, size_t *length, loff_t *ppos)
+               struct file *file, void __user *buffer, size_t *length)
 {
-       proc_dointvec(table, write, file, buffer, length, ppos);
+       proc_dointvec(table, write, file, buffer, length);
        setup_per_zone_pages_min();
        setup_per_zone_protection();
        return 0;
@@ -1969,9 +1988,9 @@ int min_free_kbytes_sysctl_handler(ctl_table *table, int write,
  *     whenever sysctl_lower_zone_protection changes.
  */
 int lower_zone_protection_sysctl_handler(ctl_table *table, int write,
-                struct file *file, void __user *buffer, size_t *length, loff_t *ppos)
+                struct file *file, void __user *buffer, size_t *length)
 {
-       proc_dointvec_minmax(table, write, file, buffer, length, ppos);
+       proc_dointvec_minmax(table, write, file, buffer, length);
        setup_per_zone_protection();
        return 0;
 }