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

[Xen-changelog] [xen-4.0-testing] Revert 22186:7167d6dd5c7c "x86: Retry do_mmu_update() a few times"



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1285141793 -3600
# Node ID b6d77507f61eb2f4158670e2ab900013837a095d
# Parent  21e0441e896dc3bd6f7f35a1a8181a5c62b7940e
Revert 22186:7167d6dd5c7c "x86: Retry do_mmu_update() a few times"

It does not work reliably for a couple of reasons:
(1) page_lock() fails if a page is !PGT_validated, and a page can
remain in that state for unbounded time.
(2) in the kernel-side race that motivated this patch, pgd_pin() can
lose to vmalloc_sync_all() -- pgd_pin() can try to chaneg a pmd page's
type to l2_pagetable while
vmalloc_sync_all()->set_pmd()->do_mmu_update() has it temporarily
pinned as writable. This is hard to fix on the Xen side.

Hence I give up on this approach, revert the patch, and settle for
kernel-side patching only.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   22193:35a1a14c408e
xen-unstable date:        Wed Sep 22 08:49:09 2010 +0100
---
 xen/arch/x86/mm.c |    7 -------
 1 files changed, 7 deletions(-)

diff -r 21e0441e896d -r b6d77507f61e xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Mon Sep 20 20:20:57 2010 +0100
+++ b/xen/arch/x86/mm.c Wed Sep 22 08:49:53 2010 +0100
@@ -3107,7 +3107,6 @@ int do_mmu_update(
         case MMU_NORMAL_PT_UPDATE:
         case MMU_PT_UPDATE_PRESERVE_AD:
         {
-            unsigned retries = 0;
             p2m_type_t p2mt;
 
             rc = xsm_mmu_normal_update(d, pg_owner, req.val);
@@ -3139,7 +3138,6 @@ int do_mmu_update(
                           (unsigned long)(req.ptr & ~PAGE_MASK));
             page = mfn_to_page(mfn);
 
-        retry:
             if ( page_lock(page) )
             {
                 switch ( page->u.inuse.type_info & PGT_type_mask )
@@ -3293,11 +3291,6 @@ int do_mmu_update(
                 okay = paging_write_guest_entry(
                     v, va, req.val, _mfn(mfn));
                 put_page_type(page);
-            }
-            else if ( retries++ < 5 )
-            {
-                /* Page type can be in flux, so we retry a few times. */
-                goto retry;
             }
 
             unmap_domain_page_with_cache(va, &mapcache);

_______________________________________________
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®.