qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH] file ram alloc: fail if cannot preallocate


From: Alexey Kardashevskiy
Subject: Re: [Qemu-devel] [RFC PATCH] file ram alloc: fail if cannot preallocate
Date: Sat, 22 Feb 2014 00:18:20 +1100
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

On 02/22/2014 12:10 AM, Alexander Graf wrote:
> 
> On 21.02.2014, at 14:04, Alexey Kardashevskiy <address@hidden> wrote:
> 
>> On 02/22/2014 12:02 AM, Alexander Graf wrote:
>>>
>>> On 21.02.2014, at 13:56, Alexey Kardashevskiy <address@hidden> wrote:
>>>
>>>> On 02/21/2014 07:57 PM, Alexander Graf wrote:
>>>>>
>>>>> On 21.02.2014, at 05:57, Alexey Kardashevskiy <address@hidden> 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.
> 

> Only if they're backed by virtual memory. And in that case why don't you
> want them be huge pages? What qualifies a region to be huge vs
> non-huge?

This just adds complication for no reason. If we disable small pages with
-mam-path, we'll have to teach SLOF and our PCI hotplug code to align BARs
and for what? HV KVM does not need this to function.


-- 
Alexey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]