From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Alexander Graf <agraf@suse.de>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Antonios Motakis <a.motakis@virtualopensystems.com>,
"list@suse.de:PowerPC" <qemu-ppc@nongnu.org>,
QEMU Developers <qemu-devel@nongnu.org>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [RFC PATCH] file ram alloc: fail if cannot preallocate
Date: Sat, 22 Feb 2014 00:04:12 +1100 [thread overview]
Message-ID: <53074ECC.7090606@ozlabs.ru> (raw)
In-Reply-To: <57F80552-CE67-411F-8263-35B84A3CEA54@suse.de>
On 02/22/2014 12:02 AM, Alexander Graf wrote:
>
> On 21.02.2014, at 13:56, Alexey Kardashevskiy <aik@ozlabs.ru> wrote:
>
>> On 02/21/2014 07:57 PM, Alexander Graf wrote:
>>>
>>> On 21.02.2014, at 05:57, Alexey Kardashevskiy <aik@ozlabs.ru> wrote:
>>>
>>>> On 02/10/2014 05:32 PM, Alexey Kardashevskiy wrote:
>>>>> At the moment if the user asked for huge pages and there is no more huge
>>>>> pages, QEMU prints warning and falls back to the anonymous memory
>>>>> allocator which is quite easy not to notice. QEMU also does so even
>>>>> if the user specified -mem-prealloc and it seems wrong as the user
>>>>> specifically requested huge pages for the entire RAM but QEMU failed to do
>>>>> so and continued. On PPC64 this will produce a fragile guest as QEMU
>>>>> tells the guest via device-tree that it can use huge pages when it
>>>>> actually cannot.
>>>>>
>>>>> This adds message+exit if RAM cannot be preallocated from huge pages.
>>>>
>>>>
>>>> Too bad? Should I increase my personal pinging timeout from 1 to 2 weeks to
>>>> avoid annoying the community? :) Thanks!
>>>
>>
>>> The patch changes the semantics of -mem-prealloc from "make sure all
>>> RAM is mapped" to "make sure all RAM is mapped and is backed by huge
>>> pages if we use huge pages" and thus is just plain wrong.
>>
>> ? I did actually expect it to alloc RAM from hugepages only. Otherwise
>> there is no point in mem-prealloc. Yes, I am ignorant, I know.
>>
>>> The real question is why are we allowing sparsely mapped huge page
>> backing at all? Should we change that? Do we need a new flag for this to
>> specify "yes, I do want all my pages backed by -mem-path"?
>>
>>
>> ? Add a switch to -mem-path saying "yes I really want -mem-path"? Sorry, I
>> lost you here. -mem-path + -mem-prealloc - like this is not enough? Why
>> would I specify -mem-path after all if I did not want RAM to backed by huge
>> pages?
>
> I think it makes sense to disable any fallback for -mem-path, so that it
> always only allocates RAM pages from the -mem-path pool. But this is a
> big change from how it used to work before and thus needs to be properly
> coordinated.
ROMs, BARs - this all will stop working if I understand things right. And
we (ozlabs) do not really want these things to be in huge pages.
>
> Paolo, Peter, any thoughts here? Version 2.0 might be a good fit for such a change ;).
>
>
> Alex
>
--
Alexey
next prev parent reply other threads:[~2014-02-21 13:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-10 6:32 [Qemu-devel] [RFC PATCH] file ram alloc: fail if cannot preallocate Alexey Kardashevskiy
2014-02-21 4:57 ` Alexey Kardashevskiy
2014-02-21 8:57 ` Alexander Graf
2014-02-21 12:56 ` Alexey Kardashevskiy
2014-02-21 13:02 ` Alexander Graf
2014-02-21 13:04 ` Alexey Kardashevskiy [this message]
2014-02-21 13:10 ` Alexander Graf
2014-02-21 13:18 ` Alexey Kardashevskiy
2014-02-21 13:22 ` Paolo Bonzini
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=53074ECC.7090606@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=a.motakis@virtualopensystems.com \
--cc=agraf@suse.de \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.