From: Kouya Shimura Subject: [PATCH] PoD: correct assertion and remove noisy messages Date: Mon, 14 Dec 2009 15:16:13 +0900 Message-ID: <7k1viynkr5.fsf@pingu.sky.yk.fujitsu.co.jp> References: <7ktyvyp8bb.fsf@pingu.sky.yk.fujitsu.co.jp> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="HduAQUMQkg" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: George Dunlap Cc: xen-devel@lists.xensource.com, Keir Fraser List-Id: xen-devel@lists.xenproject.org --HduAQUMQkg Content-Type: text/plain; charset=iso-8859-1 Content-Description: message body text Content-Transfer-Encoding: quoted-printable Sure. The patch is attached. In addition, it removes noisy messages. I don't think these messages are helpful. Thanks, Kouya Signed-off-by: Kouya Shimura George Dunlap writes: > You're right, that should be >=3D. Can you make a patch, see if it > fixes your problem, and if so send it to the list? >=20 > Thanks, > -George >=20 > On Fri, Dec 11, 2009 at 2:12 AM, Kouya Shimura = wrote: > > Hi George, > > > > Executing "xm mem-set" command twice for a guest causes > > the assertion failure. > > > > (XEN) p2m_pod_set_cache_target: Unable to allocate domheap page for= pod cache. =A0target 48183 cachesize 48050 > > (XEN) memory.c:128:d2 Could not allocate order=3D0 extent: id=3D2 m= emflags=3D0 (321 of 512) > > (XEN) memory.c:128:d2 Could not allocate order=3D0 extent: id=3D2 m= emflags=3D0 (188 of 321) > > (XEN) Assertion 'pod_target > p2md->pod.count' failed at p2m.c:526 > > (XEN) ----[ Xen-3.5-unstable =A0x86_64 =A0debug=3Dy =A0Tainted: =A0= =A0C ]---- > > (XEN) CPU: =A0 =A01 > > (XEN) RIP: =A0 =A0e008:[] p2m_pod_set_mem_target+= 0x42/0x61 > > (XEN) RFLAGS: 0000000000010246 =A0 CONTEXT: hypervisor > > (XEN) rax: 000000000000bc37 =A0 rbx: 0000000000000010 =A0 rcx: 0000= 00000000bc37 > > (XEN) rdx: 000000000000bc37 =A0 rsi: 000000000001bab9 =A0 rdi: ffff= 830127cf2000 > > (XEN) rbp: ffff8301391efc68 =A0 rsp: ffff8301391efc68 =A0 r8: =A000= 0000000002017e > > (XEN) r9: =A000000000deadbeef =A0 r10: ffff82c4802032d0 =A0 r11: 00= 00000000000282 > > (XEN) r12: 0000000046007bc0 =A0 r13: 00000000ffffffea =A0 r14: 0000= 0000ffffffda > > (XEN) r15: 0000000046007bc0 =A0 cr0: 0000000080050033 =A0 cr4: 0000= 0000000026f0 > > (XEN) cr3: 0000000129a43000 =A0 cr2: 0000000000a4e008 > > (XEN) ds: 0000 =A0 es: 0000 =A0 fs: 0063 =A0 gs: 0000 =A0 ss: e010 = =A0 cs: e008 > > (XEN) Xen stack trace from rsp=3Dffff8301391efc68: > > (XEN) =A0 =A0ffff8301391efcf8 ffff82c48015f095 ffff8301391efc88 fff= f82c480134e07 > > (XEN) =A0 =A00000000000030000 0000000000000000 0000000000000000 000= 0000000000000 > > (XEN) =A0 =A00000000000000002 ffff82f602534860 ffff830127cf2000 fff= f8300bf48a000 > > (XEN) =A0 =A0ffff82c480264080 ffff8300bf48a000 0000000000000010 000= 0000046007bc0 > > (XEN) =A0 =A000000000ffffffda 0000000046007bc0 ffff8301391eff08<= 2>memory.c:128:d2 Could not allocate order=3D0 extent: id=3D2 memflags=3D= 0 (0 of 512) > > (XEN) =A0ffff82c480113b33 > > (XEN) =A0 =A00000000000000002 00000059ef675add ffff8300bf326000 fff= f82c480262080 > > (XEN) =A0 =A0ffff8301391efd38 ffff82c48016b41e ffff8301391efd48 fff= f82c48016b4ed > > (XEN) =A0 =A0ffff8301391efd68 ffff82c48011dc44 ffff8301391efda8 000= 0000000000001 > > (XEN) =A0 =A0ffff8301391efd88 ffff82c48011887e 0000000000000001 000= 00059ef675add > > (XEN) =A0 =A0ffff8301391efdd8 0000000000000282 0000000000000001 fff= f8301391efe50 > > (XEN) =A0 =A0ffff8301391efdf8 0000000000000000 ffff8300bf326000 000= 0000000000000 > > (XEN) =A0 =A00000000000000001 ffff880001976560 ffff8301391efde8 fff= f82c48011d181 > > (XEN) =A0 =A0ffff8301391efe08 ffff82c480149f07 ffff8301391be000 000= 0000000000004 > > (XEN) =A0 =A0ffff8301391efe18 ffff82c480149f86 ffff8301391efe48 fff= f82c48010764c > > (XEN) =A0 =A00000000000000286 ffff8301391be000 0000000000000004 000= 0000000000000 > > (XEN) =A0 =A0ffff8301391efe68 ffff82c480107a26 ffffffffffffffda fff= f8800bcc21c18 > > (XEN) =A0 =A0ffff8301391efe78 ffff82c48015b7f2 ffff8301391eff28 fff= f8300bf48a000 > > (XEN) =A0 =A00000000046007bc0 0000000000000009 ffff8301391eff08 fff= f82c4801f1533 > > (XEN) =A0 =A00000000000000000 0000000000000206 ffffffff810094d4 000= 0000000000100 > > (XEN) =A0 =A000000039d18cebd7 000000000000e033 ffff8301391efee8 fff= f8300bf48a000 > > (XEN) Xen call trace: > > (XEN) =A0 =A0[] p2m_pod_set_mem_target+0x42/0x61 > > (XEN) =A0 =A0[] arch_memory_op+0xc69/0xd34 > > (XEN) =A0 =A0[] do_memory_op+0x1944/0x19a1 > > (XEN) =A0 =A0[] syscall_enter+0xef/0x149 > > (XEN) > > (XEN) > > (XEN) **************************************** > > (XEN) Panic on CPU 1: > > (XEN) Assertion 'pod_target > p2md->pod.count' failed at p2m.c:526 > > (XEN) **************************************** > > (XEN) > > (XEN) Reboot in five seconds... > > > > I'm not sure but this assertion should be > > ASSERT(pod_target >=3D p2md->pod.count) ? > > Since pod.entry_count =3D=3D pod.count at that time. > > > > Thanks, > > Kouya > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > >=20 > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel --HduAQUMQkg Content-Type: text/x-patch Content-Disposition: inline; filename="pod_assertion.patch" Content-Transfer-Encoding: 7bit diff -r b928797213ac xen/arch/x86/mm/p2m.c --- a/xen/arch/x86/mm/p2m.c Fri Dec 11 09:17:09 2009 +0000 +++ b/xen/arch/x86/mm/p2m.c Mon Dec 14 14:55:00 2009 +0900 @@ -338,7 +338,6 @@ static struct page_info * p2m_pod_cache_ /* Break up a superpage to make single pages. NB count doesn't * need to be adjusted. */ - printk("%s: Breaking up superpage.\n", __func__); p = page_list_remove_head(&p2md->pod.super); mfn = mfn_x(page_to_mfn(p)); @@ -529,7 +528,7 @@ p2m_pod_set_mem_target(struct domain *d, if ( pod_target > p2md->pod.entry_count ) pod_target = p2md->pod.entry_count; - ASSERT( pod_target > p2md->pod.count ); + ASSERT( pod_target >= p2md->pod.count ); ret = p2m_pod_set_cache_target(d, pod_target); @@ -695,7 +694,6 @@ out_entry_check: /* If we've reduced our "liabilities" beyond our "assets", free some */ if ( p2md->pod.entry_count < p2md->pod.count ) { - printk("b %d\n", p2md->pod.entry_count); p2m_pod_set_cache_target(d, p2md->pod.entry_count); } --HduAQUMQkg Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --HduAQUMQkg--