From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Juergen Gross <jgross@suse.com>,
xen-devel@lists.xen.org, linux-kernel@vger.kernel.org
Cc: helgaas@kernel.org, christian.koenig@amd.com
Subject: Re: [PATCH] xen/balloon: Mark unallocated host memory as UNUSABLE
Date: Fri, 15 Dec 2017 09:58:49 -0500 [thread overview]
Message-ID: <9f7c7d7b-e8a7-d851-472d-972a815bf8e2@oracle.com> (raw)
In-Reply-To: <1385e130-7300-66a4-3995-838244600746@suse.com>
On 12/15/2017 09:47 AM, Juergen Gross wrote:
> On 15/12/17 15:24, Boris Ostrovsky wrote:
>>>> +
>>>> + hostmem_resource->start = max_addr;
>>>> + hostmem_resource->end = entry->addr + entry->size;
>>>> + for (; i < memmap.nr_entries; i++) {
>>>> + entry = &xen_e820_table->entries[i];
>>>> + if (entry->type == E820_TYPE_RAM)
>>> Shouldn't that be != ?
>> No, the idea here is to populate hostmem_resource with ranges already
>> taken by things other than RAM, leaving memory regions as available for
>> the balloon hotplug. This will allow us to use allocate_resource(),
>> which searches for a free range, in the balloon driver.
> But why says the comment "Host memory not allocated to dom0" then?
hostmem_resource is created starting from the end of dom0 RAM and ending
at the end of host RAM. If these two are the same (or if the former is
larger, which I don't think is possible) then there is nothing to do, as
the hostmem_resource will be empty. That's what the comment is referring
to.
> And why are you trying to allocate from this resource in case of
> hotplugging memory (and fall back to iomem_resource in case of
> failure)?
Because that area (end of dom0 RAM through end of host RAM) is not going
to be used by anyone else and thus is available. That was the idea
behind f5775e0b6116.
-boris
>
> Either the comment is completely wrong and I don't understand the
> logic here, or your code is wrong.
next prev parent reply other threads:[~2017-12-15 14:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-12 22:51 Boris Ostrovsky
2017-12-15 12:09 ` Juergen Gross
2017-12-15 14:24 ` Boris Ostrovsky
2017-12-15 14:47 ` Juergen Gross
2017-12-15 14:58 ` Boris Ostrovsky [this message]
2017-12-15 15:33 ` Juergen Gross
2017-12-15 16:06 ` Boris Ostrovsky
2017-12-15 16:04 ` kbuild test robot
2017-12-15 16:21 ` Boris Ostrovsky
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=9f7c7d7b-e8a7-d851-472d-972a815bf8e2@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=christian.koenig@amd.com \
--cc=helgaas@kernel.org \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xen.org \
/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
all inboxes | Powered by JetHome®