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-changelog

[Xen-changelog] [xen-unstable] Revert 22186:7167d6dd5c7c "x86: Retry do_

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Revert 22186:7167d6dd5c7c "x86: Retry do_mmu_update() a few times"
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 09 Oct 2010 14:55:50 -0700
Delivery-date: Sat, 09 Oct 2010 15:01:26 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1285141749 -3600
# Node ID 35a1a14c408e60eca608a67a79f38ae5fdf3ea19
# Parent  a2b46be9958e5ab30932f640a7009c0c28360129
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/arch/x86/mm.c |    7 -------
 1 files changed, 7 deletions(-)

diff -r a2b46be9958e -r 35a1a14c408e xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Tue Sep 21 17:54:43 2010 +0100
+++ b/xen/arch/x86/mm.c Wed Sep 22 08:49:09 2010 +0100
@@ -3414,7 +3414,6 @@ int do_mmu_update(
         case MMU_NORMAL_PT_UPDATE:
         case MMU_PT_UPDATE_PRESERVE_AD:
         {
-            unsigned int retries = 0;
             p2m_type_t p2mt;
 
             rc = xsm_mmu_normal_update(d, pg_owner, req.val);
@@ -3446,7 +3445,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 )
@@ -3603,11 +3601,6 @@ int do_mmu_update(
                     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);
             put_page(page);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Revert 22186:7167d6dd5c7c "x86: Retry do_mmu_update() a few times", Xen patchbot-unstable <=