From: Paolo Bonzini <pbonzini@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] qemu: improve hugepage allocation failure message
Date: Wed, 10 Jan 2018 15:59:55 +0100 [thread overview]
Message-ID: <c3558c89-d0ae-929a-51c7-b27562ac2853@redhat.com> (raw)
In-Reply-To: <20180109201616.dsrhwi5xzmrqbgnq@hz-desktop>
On 09/01/2018 21:16, Haozhong Zhang wrote:
> On 01/09/18 17:37 -0200, Marcelo Tosatti wrote:
>>
>> Improve hugepage allocation failure message, indicating
>> whats happening to the user.
>>
>> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
>>
>> diff --git a/exec.c b/exec.c
>> index 4722e521d4..439abedb98 100644
>> --- a/exec.c
>> +++ b/exec.c
>> @@ -1643,7 +1643,8 @@ static void *file_ram_alloc(RAMBlock *block,
>> block->flags & RAM_SHARED);
>> if (area == MAP_FAILED) {
>> error_setg_errno(errp, errno,
>> - "unable to map backing store for guest RAM");
>> + "unable to map backing store for guest RAM, "
>> + "falling back to malloc based RAM allocation");
>> return NULL;
>> }
>>
>
> The backing store here is not always hugetlbfs, e.g., it can be NVDIMM
> and even regular files. In those cases, the failure of file_ram_alloc()
> does not fall back to malloc.
It's also not happending if !mem_prealloc. Let's instead add an
error_report in allocate_system_memory_nonnuma (and it's probably better
to use MAP_ANON instead of malloc in the message).
Paolo
prev parent reply other threads:[~2018-01-10 15:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 19:37 [Qemu-devel] [PATCH] qemu: improve hugepage allocation failure message Marcelo Tosatti
2018-01-09 19:41 ` Eric Blake
2018-01-09 20:16 ` Haozhong Zhang
2018-01-10 14:59 ` Paolo Bonzini [this message]
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=c3558c89-d0ae-929a-51c7-b27562ac2853@redhat.com \
--to=pbonzini@redhat.com \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).