Print this page
XXXX remove i86xpv platform code
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>

@@ -39,13 +39,10 @@
 #include <sys/memlist.h>
 #include <sys/vnode.h>
 #include <vm/seg_map.h>
 #include <vm/seg_vn.h>
 #include <vm/seg_hole.h>
-#if defined(__i386) || defined(__amd64)
-#include <sys/balloon_impl.h>
-#endif
 
 #include "avl.h"
 #include "memory.h"
 
 /*

@@ -507,14 +504,10 @@
         memstat_t stats;
         GElf_Sym sym;
         vn_htable_t ht;
         struct vnode *kvps;
         uintptr_t vn_size = 0;
-#if defined(__i386) || defined(__amd64)
-        bln_stats_t bln_stats;
-        ssize_t bln_size;
-#endif
 
         bzero(&stats, sizeof (memstat_t));
 
         /*
          * -s size, is an internal option. It specifies the size of vn_htable.

@@ -629,33 +622,14 @@
         if (physmem > stats.ms_total)
                 freemem = physmem - stats.ms_total;
         else
                 freemem = 0;
 
-#if defined(__i386) || defined(__amd64)
-        /* Are we running under Xen?  If so, get balloon memory usage. */
-        if ((bln_size = mdb_readvar(&bln_stats, "bln_stats")) != -1) {
-                if (freemem > bln_stats.bln_hv_pages)
-                        freemem -= bln_stats.bln_hv_pages;
-                else
-                        freemem = 0;
-        }
-#endif
-
         mdb_printf("Free (freelist)  %16lu  %16llu  %3lu%%\n", freemem,
             (uint64_t)freemem * PAGESIZE / (1024 * 1024),
             MS_PCT_TOTAL(freemem));
 
-#if defined(__i386) || defined(__amd64)
-        if (bln_size != -1) {
-                mdb_printf("Balloon          %16lu  %16llu  %3lu%%\n",
-                    bln_stats.bln_hv_pages,
-                    (uint64_t)bln_stats.bln_hv_pages * PAGESIZE / (1024 * 1024),
-                    MS_PCT_TOTAL(bln_stats.bln_hv_pages));
-        }
-#endif
-
         mdb_printf("\nTotal            %16lu  %16lu\n",
             physmem,
             (uint64_t)physmem * PAGESIZE / (1024 * 1024));
 
         if (physmem != total_pages) {