Re: [Xen-devel] [RFC PATCH v2 05/25] x86: NUMA: Move generic dummy_numa_init to separate function
>>>03/28/17 5:54 PM >>> > @@ -301,6 +290,22 @@ void __init numa_initmem_init(unsigned long start_pfn, > unsigned long end_pfn) > (paddr_t)end_pfn << PAGE_SHIFT); > } > > +void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn) > +{ > +#ifdef CONFIG_NUMA_EMU > +if ( get_numa_fake() && !numa_emulation(start_pfn, end_pfn) ) > +return; > +#endif > + > +#ifdef CONFIG_ACPI_NUMA > +if ( !is_numa_off() && !acpi_scan_nodes((uint64_t)start_pfn << > PAGE_SHIFT, > + (uint64_t)end_pfn << PAGE_SHIFT) ) Please use pfn_to_paddr() as you move this code. Jan ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel
Re: [Xen-devel] [RFC PATCH v2 05/25] x86: NUMA: Move generic dummy_numa_init to separate function
On Thu, Apr 20, 2017 at 9:42 PM, Julien Grallwrote: > Hi Vijay, > > > On 28/03/17 16:53, vijay.kil...@gmail.com wrote: >> >> From: Vijaya Kumar K >> >> Split numa_initmem_init() so that the numa fallback code is moved >> as separate function which is generic. >> >> Signed-off-by: Vijaya Kumar K >> --- >> xen/arch/x86/numa.c | 29 + >> 1 file changed, 17 insertions(+), 12 deletions(-) >> >> diff --git a/xen/arch/x86/numa.c b/xen/arch/x86/numa.c >> index 6b794a7..0888d53 100644 >> --- a/xen/arch/x86/numa.c >> +++ b/xen/arch/x86/numa.c >> @@ -268,21 +268,10 @@ static int __init numa_emulation(uint64_t start_pfn, >> uint64_t end_pfn) >> } >> #endif >> >> -void __init numa_initmem_init(unsigned long start_pfn, unsigned long >> end_pfn) >> +static void __init numa_dummy_init(unsigned long start_pfn, unsigned long >> end_pfn) >> { >> int i; >> >> -#ifdef CONFIG_NUMA_EMU >> -if ( get_numa_fake() && !numa_emulation(start_pfn, end_pfn) ) >> -return; >> -#endif >> - >> -#ifdef CONFIG_ACPI_NUMA >> -if ( !is_numa_off() && !acpi_scan_nodes((uint64_t)start_pfn << >> PAGE_SHIFT, >> - (uint64_t)end_pfn << PAGE_SHIFT) ) >> -return; >> -#endif >> - >> printk(KERN_INFO "%s\n", >> is_numa_off() ? "NUMA turned off" : "No NUMA configuration >> found"); >> >> @@ -301,6 +290,22 @@ void __init numa_initmem_init(unsigned long >> start_pfn, unsigned long end_pfn) >> (paddr_t)end_pfn << PAGE_SHIFT); >> } >> >> +void __init numa_initmem_init(unsigned long start_pfn, unsigned long >> end_pfn) >> +{ >> +#ifdef CONFIG_NUMA_EMU >> +if ( get_numa_fake() && !numa_emulation(start_pfn, end_pfn) ) >> +return; >> +#endif > > > I am not sure where to comment about it in this series, so I will say it > here. > > As asked on v1, why don't you consider fake NUMA? This would help to test > the series on non-NUMA platform. I have not tested non-NUMA case with this series. Agreed this two lines should be added to numa_initmem_init() of arm (xen/arch/arm/numa/numa.c) > >> + >> +#ifdef CONFIG_ACPI_NUMA >> +if ( !is_numa_off() && !acpi_scan_nodes((uint64_t)start_pfn << >> PAGE_SHIFT, >> + (uint64_t)end_pfn << PAGE_SHIFT) ) >> +return; >> +#endif >> + >> +numa_dummy_init(start_pfn, end_pfn); >> +} >> + >> void numa_add_cpu(int cpu) >> { >> cpumask_set_cpu(cpu, _to_cpumask[cpu_to_node(cpu)]); >> > > Cheers, > > -- > Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel
Re: [Xen-devel] [RFC PATCH v2 05/25] x86: NUMA: Move generic dummy_numa_init to separate function
Hi Vijay, On 28/03/17 16:53, vijay.kil...@gmail.com wrote: From: Vijaya Kumar KSplit numa_initmem_init() so that the numa fallback code is moved as separate function which is generic. Signed-off-by: Vijaya Kumar K --- xen/arch/x86/numa.c | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/xen/arch/x86/numa.c b/xen/arch/x86/numa.c index 6b794a7..0888d53 100644 --- a/xen/arch/x86/numa.c +++ b/xen/arch/x86/numa.c @@ -268,21 +268,10 @@ static int __init numa_emulation(uint64_t start_pfn, uint64_t end_pfn) } #endif -void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn) +static void __init numa_dummy_init(unsigned long start_pfn, unsigned long end_pfn) { int i; -#ifdef CONFIG_NUMA_EMU -if ( get_numa_fake() && !numa_emulation(start_pfn, end_pfn) ) -return; -#endif - -#ifdef CONFIG_ACPI_NUMA -if ( !is_numa_off() && !acpi_scan_nodes((uint64_t)start_pfn << PAGE_SHIFT, - (uint64_t)end_pfn << PAGE_SHIFT) ) -return; -#endif - printk(KERN_INFO "%s\n", is_numa_off() ? "NUMA turned off" : "No NUMA configuration found"); @@ -301,6 +290,22 @@ void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn) (paddr_t)end_pfn << PAGE_SHIFT); } +void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn) +{ +#ifdef CONFIG_NUMA_EMU +if ( get_numa_fake() && !numa_emulation(start_pfn, end_pfn) ) +return; +#endif I am not sure where to comment about it in this series, so I will say it here. As asked on v1, why don't you consider fake NUMA? This would help to test the series on non-NUMA platform. + +#ifdef CONFIG_ACPI_NUMA +if ( !is_numa_off() && !acpi_scan_nodes((uint64_t)start_pfn << PAGE_SHIFT, + (uint64_t)end_pfn << PAGE_SHIFT) ) +return; +#endif + +numa_dummy_init(start_pfn, end_pfn); +} + void numa_add_cpu(int cpu) { cpumask_set_cpu(cpu, _to_cpumask[cpu_to_node(cpu)]); Cheers, -- Julien Grall ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel
[Xen-devel] [RFC PATCH v2 05/25] x86: NUMA: Move generic dummy_numa_init to separate function
From: Vijaya Kumar KSplit numa_initmem_init() so that the numa fallback code is moved as separate function which is generic. Signed-off-by: Vijaya Kumar K --- xen/arch/x86/numa.c | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/xen/arch/x86/numa.c b/xen/arch/x86/numa.c index 6b794a7..0888d53 100644 --- a/xen/arch/x86/numa.c +++ b/xen/arch/x86/numa.c @@ -268,21 +268,10 @@ static int __init numa_emulation(uint64_t start_pfn, uint64_t end_pfn) } #endif -void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn) +static void __init numa_dummy_init(unsigned long start_pfn, unsigned long end_pfn) { int i; -#ifdef CONFIG_NUMA_EMU -if ( get_numa_fake() && !numa_emulation(start_pfn, end_pfn) ) -return; -#endif - -#ifdef CONFIG_ACPI_NUMA -if ( !is_numa_off() && !acpi_scan_nodes((uint64_t)start_pfn << PAGE_SHIFT, - (uint64_t)end_pfn << PAGE_SHIFT) ) -return; -#endif - printk(KERN_INFO "%s\n", is_numa_off() ? "NUMA turned off" : "No NUMA configuration found"); @@ -301,6 +290,22 @@ void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn) (paddr_t)end_pfn << PAGE_SHIFT); } +void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn) +{ +#ifdef CONFIG_NUMA_EMU +if ( get_numa_fake() && !numa_emulation(start_pfn, end_pfn) ) +return; +#endif + +#ifdef CONFIG_ACPI_NUMA +if ( !is_numa_off() && !acpi_scan_nodes((uint64_t)start_pfn << PAGE_SHIFT, + (uint64_t)end_pfn << PAGE_SHIFT) ) +return; +#endif + +numa_dummy_init(start_pfn, end_pfn); +} + void numa_add_cpu(int cpu) { cpumask_set_cpu(cpu, _to_cpumask[cpu_to_node(cpu)]); -- 2.7.4 ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel