Patch "xen/balloon: Subtract from xen_released_pages the count that is populated." has been added to the 3.4-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    xen/balloon: Subtract from xen_released_pages the count that is populated.

to the 3.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     xen-balloon-subtract-from-xen_released_pages-the-count-that-is-populated.patch
and it can be found in the queue-3.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 58b7b53a36b0be8081fbfc91aeea24b83c20ca1b Mon Sep 17 00:00:00 2001
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Tue, 29 May 2012 12:36:43 -0400
Subject: xen/balloon: Subtract from xen_released_pages the count that is populated.

From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>

commit 58b7b53a36b0be8081fbfc91aeea24b83c20ca1b upstream.

We did not take into account that xen_released_pages would be
used outside the initial E820 parsing code. As such we would
did not subtract from xen_released_pages the count of pages
that we had populated back (instead we just did a simple
extra_pages = released - populated).

The balloon driver uses xen_released_pages to set the initial
current_pages count.  If this is wrong (too low) then when a new
(higher) target is set, the balloon driver will request too many pages
from Xen."

This fixes errors such as:

(XEN) memory.c:133:d0 Could not allocate order=0 extent: id=0 memflags=0 (51 of 512)
during bootup and
free_memory            : 0

where the free_memory should be 128.

Acked-by: David Vrabel <david.vrabel@xxxxxxxxxx>
[v1: Per David's review made the git commit better]
Signed-off-by: Daniel Kiper <daniel.kiper@xxxxxxxxxx>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 arch/x86/xen/setup.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -399,7 +399,8 @@ char * __init xen_memory_setup(void)
 	populated = xen_populate_chunk(map, memmap.nr_entries,
 			max_pfn, &last_pfn, xen_released_pages);
 
-	extra_pages += (xen_released_pages - populated);
+	xen_released_pages -= populated;
+	extra_pages += xen_released_pages;
 
 	if (last_pfn > max_pfn) {
 		max_pfn = min(MAX_DOMAIN_PAGES, last_pfn);


Patches currently in stable-queue which might be from konrad.wilk@xxxxxxxxxx are

queue-3.4/xen-p2m-move-code-around-to-allow-for-better-re-usage.patch
queue-3.4/xen-populate-correct-number-of-pages-when-across-mem-boundary-v2.patch
queue-3.4/xen-p2m-collapse-early_alloc_p2m_middle-redundant-checks.patch
queue-3.4/xen-setup-populate-freed-mfns-from-non-ram-e820-entries-and-gaps-to-e820-ram.patch
queue-3.4/xen-p2m-reserve-8mb-of-_brk-space-for-p2m-leafs-when-populating-back.patch
queue-3.4/xen-setup-combine-the-two-hypercall-functions-since-they-are-quite-similar.patch
queue-3.4/xen-p2m-allow-alloc_p2m_middle-to-call-reserve_brk-depending-on-argument.patch
queue-3.4/xen-p2m-an-early-bootup-variant-of-set_phys_to_machine.patch
queue-3.4/xen-balloon-subtract-from-xen_released_pages-the-count-that-is-populated.patch
queue-3.4/xen-setup-update-va-mapping-when-releasing-memory-during-setup.patch
queue-3.4/xen-p2m-reuse-existing-p2m-leafs-if-they-are-filled-with-1-1-pfns-or-invalid.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]