xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: xen-devel@lists.xensource.com
Cc: David Vrabel <david.vrabel@citrix.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: [PATCH 2/5] xen/balloon: simplify test for the end of usable RAM
Date: Wed, 28 Sep 2011 17:46:33 +0100	[thread overview]
Message-ID: <1317228396-8870-3-git-send-email-david.vrabel@citrix.com> (raw)
In-Reply-To: <1317228396-8870-1-git-send-email-david.vrabel@citrix.com>

From: David Vrabel <david.vrabel@citrix.com>

When initializing the balloon only max_pfn needs to be checked
(max_pfn will always be <= e820_end_of_ram_pfn()) and improve the
confusing comment.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
---
 drivers/xen/balloon.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index 4f59fb3..9efb993 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -586,16 +586,16 @@ static int __init balloon_init(void)
 #endif
 
 	/*
-	 * Initialise the balloon with excess memory space.  We need
-	 * to make sure we don't add memory which doesn't exist or
-	 * logically exist.  The E820 map can be trimmed to be smaller
-	 * than the amount of physical memory due to the mem= command
-	 * line parameter.  And if this is a 32-bit non-HIGHMEM kernel
-	 * on a system with memory which requires highmem to access,
-	 * don't try to use it.
+	 * Initialize the balloon with pages from the extra memory
+	 * region (see arch/x86/xen/setup.c).
+	 *
+	 * If the amount of usable memory has been limited (e.g., with
+	 * the 'mem' command line parameter), don't add pages beyond
+	 * this limit.
 	 */
-	extra_pfn_end = min(min(max_pfn, e820_end_of_ram_pfn()),
-			    (unsigned long)PFN_DOWN(xen_extra_mem_start + xen_extra_mem_size));
+	extra_pfn_end = min(max_pfn,
+			    (unsigned long)PFN_DOWN(xen_extra_mem_start
+						    + xen_extra_mem_size));
 	for (pfn = PFN_UP(xen_extra_mem_start);
 	     pfn < extra_pfn_end;
 	     pfn++) {
-- 
1.7.2.5

  parent reply	other threads:[~2011-09-28 16:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-28 16:46 [PATCH 0/5] xen: memory initialization/balloon fixes (#4) David Vrabel
2011-09-28 16:46 ` [PATCH 1/5] xen/balloon: account for pages released during memory setup David Vrabel
2011-09-28 16:46 ` David Vrabel [this message]
2011-09-28 16:46 ` [PATCH 3/5] xen: allow balloon driver to use more than one memory region David Vrabel
2011-09-28 16:46 ` [PATCH 4/5] xen: allow extra memory to be in multiple regions David Vrabel
2011-09-29 11:08   ` [PATCH] xen: release all pages within 1-1 p2m mappings David Vrabel
2011-09-29 11:29     ` David Vrabel
2011-09-29 11:26   ` [PATCH 1/2] xen: allow extra memory to be in multiple regions David Vrabel
2011-09-29 11:26   ` [PATCH 2/2] xen: release all pages within 1-1 p2m mappings David Vrabel
2011-09-28 16:46 ` [PATCH 5/5] " David Vrabel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1317228396-8870-3-git-send-email-david.vrabel@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).