mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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:24:50 -0500	[thread overview]
Message-ID: <a8495745-b56a-83ff-993f-a745c8edf2c0@oracle.com> (raw)
In-Reply-To: <14852f9f-f234-3226-f32b-3080ca114332@suse.com>


>> +
>> +	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.


>
>> +			continue;
>> +
>> +		res = kzalloc(sizeof(*res), GFP_KERNEL);
>> +		if (!res) {
>> +			pr_warn("%s: Out of memory\n", __func__);
> Don't print error message in case of allocation failures.

Right, In fact checkpatch also suggested that I drop it. And I forgot.


-boris

  reply	other threads:[~2017-12-15 14:29 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 [this message]
2017-12-15 14:47     ` Juergen Gross
2017-12-15 14:58       ` Boris Ostrovsky
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=a8495745-b56a-83ff-993f-a745c8edf2c0@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®