Skip to contentSkip to conversation

pvops-dom0 console freezes after latest ballooning patch (+possible fix)

PATCH [email protected] 3 participants 4 messages Dec 9, 2009

lore
Share & tools
lore
#0 lore raw
xen/balloon.c renamed from xen/balloon.c.org +2 -0
@@ -339,6 +339,8 @@
 				discontig_free = 1;
 
 			set_phys_to_machine(lpfn, INVALID_P2M_ENTRY);
+                        page = pfn_to_page(lpfn);
+
 			if (!PageHighMem(page)) {
 				ret = HYPERVISOR_update_va_mapping(
 					(unsigned long)__va(lpfn << PAGE_SHIFT),

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 5 lines · On 12/09/09 11:22, [email protected] wrote:

Setup: xen 3.4.1, 32-bit linux dom0 2.6.31.6 from pvops-git tree from 2009-12-03

Since the latest ballooning patch "Add hugepage support to balloon driver <http://git.kernel.org/?p=linux/kernel/git/jeremy/xen.git;a=commit;h=0e898d5e9b893324435e0e77b67fe8d2f0523dbe>" i experience dom0 console freezes. Additional to that there is a stacktrace about a kernel-bug in drivers/xen/balloon.c in line 346, invalide opcode 0000 (i can send the full stacktrace if someone is interested).

Yes, please. Presumably its from the BUG_ON testing the hypercall return status?

Quoted 3 lines

The cause for that seems to be that in the decrease_reservation-funtion the PageHighMem - check is not executed on the assocciated page for the current pfn. Its always the last page that got allocated in the for-loop before, when all the pages are allocated.

With the attached patch that crashes dont occur anymore. But im not a kernel-developer so im not sure that this is the correct fix.

It looks reasonable to me. Dave?

J

#2 lore raw
Quoted 22 lines · Jeremy Fitzhardinge
Quoted 11 lines · On 12/09/09 11:22, [email protected] wrote:

Setup: xen 3.4.1, 32-bit linux dom0 2.6.31.6 from pvops-git tree from 2009-12-03

Since the latest ballooning patch "Add hugepage support to balloon driver
<http://git.kernel.org/?p=linux/kernel/git/jeremy/xen.git;a=commit;h=0e89
8d5e9b893324435e0e77b67fe8d2f0523dbe>" i experience dom0 console freezes. Additional to that there is a stacktrace about a kernel-bug in drivers/xen/balloon.c in line 346, invalide opcode 0000 (i can send the full stacktrace if someone is interested).

Yes, please. Presumably its from the BUG_ON testing the hypercall return status?

Quoted 6 lines

The cause for that seems to be that in the decrease_reservation-funtion the PageHighMem - check is not executed on the assocciated page for the current pfn. Its always the last page that got allocated in the for-loop before, when all the pages are allocated.

Quoted 6 lines
Quoted 2 lines

With the attached patch that crashes dont occur anymore. But im not a kernel-developer so im not sure that this is the correct fix.

It looks reasonable to me. Dave?

J

Yes, absolutely. It's the correct fix. Good catch.

Dave McCracken
Oracle Corp.

#3 lore raw
Quoted 2 lines · Dave McCracken

Yes, absolutely. It's the correct fix. Good catch.

OK, I'll add an acked-by for you.

Ronny, thanks for the patch and the good description of the bug it fixes and how; together they're almost a perfect patch. I added a Signed-off-by: line for you.

J