|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/2] page-alloc/x86: don't restrict DMA heap to node 0
On 10/08/16 10:23, Jan Beulich wrote:
> --- a/xen/arch/x86/numa.c
> +++ b/xen/arch/x86/numa.c
> @@ -355,11 +355,21 @@ void __init init_cpu_to_node(void)
> }
> }
>
> -EXPORT_SYMBOL(cpu_to_node);
> -EXPORT_SYMBOL(node_to_cpumask);
> -EXPORT_SYMBOL(memnode_shift);
> -EXPORT_SYMBOL(memnodemap);
> -EXPORT_SYMBOL(node_data);
> +unsigned int __init arch_get_dma_bitsize(void)
> +{
> + unsigned int node;
> +
> + for_each_online_node(node)
> + if ( node_spanned_pages(node) &&
> + !(node_start_pfn(node) >> (32 - PAGE_SHIFT)) )
> + break;
> + if ( node >= MAX_NUMNODES )
> + panic("No node with memory below 4Gb");
> +
> + return min_t(unsigned int,
> + flsl(node_start_pfn(node) + node_spanned_pages(node) / 4 -
> 1)
> + + PAGE_SHIFT, 32);
You have moved the -1 and -2 inside the flsl() call, which alters its
behaviour quite a bit. Is this intentional or accidental?
~Andrew
> +}
>
> static void dump_numa(unsigned char key)
> {
> --- a/xen/common/page_alloc.c
> +++ b/xen/common/page_alloc.c
> @@ -1368,16 +1368,7 @@ void __init end_boot_allocator(void)
> init_heap_pages(virt_to_page(bootmem_region_list), 1);
>
> if ( !dma_bitsize && (num_online_nodes() > 1) )
> - {
> -#ifdef CONFIG_X86
> - dma_bitsize = min_t(unsigned int,
> - flsl(NODE_DATA(0)->node_spanned_pages) - 1
> - + PAGE_SHIFT - 2,
> - 32);
> -#else
> - dma_bitsize = 32;
> -#endif
> - }
> + dma_bitsize = arch_get_dma_bitsize();
>
> printk("Domain heap initialised");
> if ( dma_bitsize )
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |