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

[Xen-changelog] Use page-sized batches in GETPAGEFRAMEINFO2 (and generally tidy up).



# HG changeset patch
# User smh22@xxxxxxxxxxxxxxxxxxxx
# Node ID 9c81a3c5b33b868632a83806e88f2328c11c2e93
# Parent  26b961b7215378fd0356c6be73b8ff669b83945c
Use page-sized batches in GETPAGEFRAMEINFO2 (and generally tidy up). 

Signed-off-by: Steven Hand <steven@xxxxxxxxxxxxx>

diff -r 26b961b72153 -r 9c81a3c5b33b xen/arch/x86/dom0_ops.c
--- a/xen/arch/x86/dom0_ops.c   Fri Nov 25 08:17:34 2005
+++ b/xen/arch/x86/dom0_ops.c   Fri Nov 25 09:51:09 2005
@@ -248,7 +248,7 @@
 
     case DOM0_GETPAGEFRAMEINFO2:
     {
-#define GPF2_BATCH 128
+#define GPF2_BATCH (PAGE_SIZE / sizeof(unsigned long)) 
         int n,j;
         int num = op->u.getpageframeinfo2.num;
         domid_t dom = op->u.getpageframeinfo2.domain;
@@ -285,12 +285,9 @@
                 struct pfn_info *page;
                 unsigned long mfn = l_arr[j];
 
-                if ( unlikely(mfn >= max_page) )
-                    goto e2_err;
-
                 page = &frame_table[mfn];
-  
-                if ( likely(get_page(page, d)) )
+
+                if ( likely(pfn_valid(mfn) && get_page(page, d)) ) 
                 {
                     unsigned long type = 0;
 
@@ -316,10 +313,7 @@
                     put_page(page);
                 }
                 else
-                {
-                e2_err:
                     l_arr[j] |= XTAB;
-                }
 
             }
 
@@ -329,7 +323,7 @@
                 break;
             }
 
-            n += j;
+            n += k;
         }
 
         free_xenheap_page(l_arr);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.