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

Re: [Xen-devel] [PATCH V1] xen/arm: domain_build: introduce dom0_lowmem bootargs



Hello Julien,

On Wed, Sep 14, 2016 at 01:06:01PM +0100, Julien Grall wrote:
>
>
>On 14/09/16 13:03, Peng Fan wrote:
>>Hello Julien,
>
>Hello Peng,
>
>>On Wed, Sep 14, 2016 at 11:47:10AM +0100, Julien Grall wrote:
>>>Hello,
>>>
>>>On 14/09/16 08:41, Peng Fan wrote:
>>>>On Wed, Sep 14, 2016 at 08:23:24AM +0100, Julien Grall wrote:
>>>>diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
>>>>index 35ab08d..cc71e6f 100644
>>>>--- a/xen/arch/arm/domain_build.c
>>>>+++ b/xen/arch/arm/domain_build.c
>>>>@@ -28,6 +28,8 @@
>>>>
>>>>static unsigned int __initdata opt_dom0_max_vcpus;
>>>>integer_param("dom0_max_vcpus", opt_dom0_max_vcpus);
>>>>+static bool_t __initdata opt_dom0_use_lowmem;
>>>>+boolean_param("dom0_use_lowmem", opt_dom0_use_lowmem);
>>>>
>>>>int dom0_11_mapping = 1;
>>>>
>>>>@@ -244,7 +246,7 @@ static void allocate_memory(struct domain *d, struct
>>>>kernel_info *kinfo)
>>>>    unsigned int order = get_11_allocation_size(kinfo->unassigned_mem);
>>>>    int i;
>>>>    
>>>>-    bool_t lowmem = is_32bit_domain(d);
>>>>+    bool_t lowmem = is_32bit_domain(d) || opt_dom0_use_lowmem;
>>>>    unsigned int bits;
>>>>
>>>>
>>>>Pass "dom0_use_lowmem=1" to xen to allocate lowmem as much as possible.
>>>
>>>Again, what is the benefit to have a command line option for that?
>>
>>Then you prefer directly change "bool_t lowmem = is_32bit_domain(d);" to 
>>"bool_t lowmem = true" ?
>>I just want to give user a choice.
>
>We don't add new command line parameter just because they look cool to have.
>So far, you did not explain why it would be good to let the choice to the
>user and how it could be used.

I have not try, if there is no lowmem.

I have not look into alloc_domheap_pages.
I am not sure whether there is such a platform or not,
just thinking if there is soc that dram memory starts from 4GB, and there is no 
dram
below 4GB. If we still can get memory when lowmem is true, I am ok to change 
directly assign
lowmem with value true. Anyway I have not look into the internals of domheap and
not sure whether there is such a platform that no lowmem (:-

    while ( order >= min_low_order )
    {
        for ( bits = order ; bits <= (lowmem ? 32 : PADDR_BITS); bits++ )
        {
            pg = alloc_domheap_pages(d, order, MEMF_bits(bits));
            if ( pg != NULL )
                goto got_bank0;
        }
        order--;
    }

    panic("Unable to allocate first memory bank");

Thanks,
Peng.
>
>Regards,
>
>-- 
>Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.