Balloon fix
PATCH 1/1 Balloon fix
The patch fixes booting a 64-bit dom0 on machine with 4GB.
PATCH 1/1 Include in balloon page tracking only PFNs which are marked as RAM in E820.
From: Konrad Rzeszutek Wilk <[email protected]>
--- drivers/xen/balloon.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
drivers/xen/balloon.c +6 -2
@@ -416,8 +416,12 @@ static int __init balloon_init(void)/* Initialise the balloon with excess memory space. */ for (pfn = xen_start_info->nr_pages; pfn < max_pfn; pfn++) { - page =pfn_to_page (pfn); -balloon_append (page); +int is_ram =page_is_ram (pfn); +if (is_ram) { + page =pfn_to_page (pfn); +if (PageReserved (page)) +balloon_append (page); + } } target_watch.callback = watch_target;
Signature · 1 line
1.6.2.5
Re: [PATCH] Include in balloon page tracking only PFNs which are marked as RAM in E820.
Gianluca,
I had not done any extensive testing. Would appreciate your feedback on this patch.
Quoted 34 lines · Konrad Rzeszutek Wilk
From: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by Konrad Rzeszutek Wilk <[email protected]>--- drivers/xen/balloon.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)drivers/xen/balloon.c +6
-2@@ -416,8 +416,12 @@ static int __init balloon_init(void)/* Initialise the balloon with excess memory space. */ for (pfn = xen_start_info->nr_pages; pfn < max_pfn; pfn++) { - page =pfn_to_page (pfn); -balloon_append (page); +int is_ram =page_is_ram (pfn); +if (is_ram) { + page =pfn_to_page (pfn); +if (PageReserved (page)) +balloon_append (page); + } } target_watch.callback = watch_target;Signature · 7 lines
1.6.2.5 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xensource.com/xen-devel
Re: [PATCH] Include in balloon page tracking only PFNs which are marked as RAM in E820.
Hi,
Ok, by looking at this patch it's clear that you are testing with a kernel that tries to allow kernels to boot ballooned.
In this case the patch is correct. Since the patch is actually reverted, I think we should wait to apply it until I succeed to reproduce the bug that caused Jeremy to revert it.
Only one style comment:
Quoted 14 lines · Konrad Rzeszutek Wilk
Quoted 13 lines · Konrad Rzeszutek Wilk
From: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by Konrad Rzeszutek Wilk <[email protected]>--- drivers/xen/balloon.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)drivers/xen/balloon.c +0
-0@@ -416,8 +416,12 @@ static int __init balloon_init(void)
Quoted 5 lines
drivers/xen/balloon.c static int __init balloon_init(void) · line 419
Quoted 5 lines
drivers/xen/balloon.c +1
-2/* Initialise the balloon with excess memory space. */ for (pfn = xen_start_info->nr_pages; pfn < max_pfn; pfn++) { - page =pfn_to_page (pfn); -balloon_append (page); +int is_ram =page_is_ram (pfn);
Do you really need to declare this as a variable? couldn't you put the expression in the if statement?
Quoted 10 lines
Quoted 10 lines
drivers/xen/balloon.c +5
-0+if (is_ram) { + page =pfn_to_page (pfn); +if (PageReserved (page)) +balloon_append (page); + } } target_watch.callback = watch_target;Signature · 1 line
1.6.2.5
Thanks,
Gianluca
Re: [PATCH] Include in balloon page tracking only PFNs which are marked as RAM in E820.
Quoted 8 lines · Gianluca Guida
Hi,
Ok, by looking at this patch it's clear that you are testing with a kernel that tries to allow kernels to boot ballooned.
In this case the patch is correct. Since the patch is actually reverted, I think we should wait to apply it until I succeed to reproduce the bug that caused Jeremy to revert it.
You are talking about the 7394b25905929a92e51771b832ee67b70ccebcf0 patch? I will wait and if this patch is still needed I will send it out to LKML/xen-devel with your style comment.
Quoted 3 lines
Quoted 1 line
Quoted 1 line
+ int
is_ram=page_is_ram(pfn);Do you really need to declare this as a variable? couldn't you put the
Not at all. Right after I sent it out I realized it would have been looking better without.
Quoted 1 line
expression in the if statement?