WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] [RFC] Nested Paging Live Migration

This patch creates a common interface for live migration. It also
supports nested paging live migration.

Signed-off-by: Wei Huang <wei.huang2@xxxxxxx>


>> @@ -2565,7 +2568,7 @@ void shadow_teardown(struct domain *d)
>>          if (d->arch.paging.shadow.hash_table)
>>              shadow_hash_teardown(d);
>>          /* Release the log-dirty bitmap of dirtied pages */
>> -        sh_free_log_dirty_bitmap(d);
>> +        paging_free_log_dirty_bitmap(d);
> 
> Shouldn't this be handled in paging.c?  Otherwise we'd need to
> acquire the log-dirty lock with the shadow lock held. 
> 

Please ignore my previous patch. Most of time, log dirty will be turned
on and off together. Under this assumption, my previous patch only
removes paging_free_log_dirty_bitmap() from shadow.c and hap.c. But it
does not call paging_free_log_dirty_bitmap() in paging_teardown().

The attached file is same as previous one, expect that it adds a
paging_log_dirty_teardown() function to paging.c (see below).

Thanks,

-Wei

===============
diff -r f270fef2fb60 -r 6323c8beb60c xen/arch/x86/mm/paging.c
--- a/xen/arch/x86/mm/paging.c  Fri Jun 08 05:10:28 2007 -0500
+++ b/xen/arch/x86/mm/paging.c  Fri Jun 08 08:05:56 2007 -0500
@@ -305,6 +305,13 @@ void paging_log_dirty_init(struct domain
     d->arch.paging.log_dirty.clean_dirty_bitmap = clean_dirty_bitmap;
 }
 
+/* This function fress log dirty bitmap resources. */
+void paging_log_dirty_teardown(struct domain*d)
+{
+    log_dirty_lock(d);
+    paging_free_log_dirty_bitmap(d);
+    log_dirty_unlock(d);
+}
 /************************************************/
 /*           CODE FOR PAGING SUPPORT            */
 /************************************************/
@@ -390,6 +397,9 @@ int paging_domctl(struct domain *d, xen_
 /* Call when destroying a domain */
 void paging_teardown(struct domain *d)
 {
+    /* clean up log dirty resources. */
+    paging_log_dirty_teardown(d);
+    
     if ( opt_hap_enabled && is_hvm_domain(d) )
         hap_teardown(d);
     else

Attachment: live_migration_patch_with_bitmap_free.txt
Description: live_migration_patch_with_bitmap_free.txt

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