lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <65660251-bc25-c676-b08c-5168885faf5d@mips.com>
Date:   Tue, 13 Feb 2018 14:09:24 +0000
From:   Matt Redfearn <matt.redfearn@...s.com>
To:     Serge Semin <fancer.lancer@...il.com>, <ralf@...ux-mips.org>,
        <miodrag.dinic@...s.com>, <jhogan@...nel.org>,
        <goran.ferenc@...s.com>, <david.daney@...ium.com>,
        <paul.gortmaker@...driver.com>, <paul.burton@...s.com>,
        <alex.belits@...ium.com>, <Steven.Hill@...ium.com>
CC:     <alexander.sverdlin@...ia.com>, <kumba@...too.org>,
        <marcin.nowakowski@...s.com>, <James.hogan@...s.com>,
        <Peter.Wotton@...s.com>, <Sergey.Semin@...latforms.ru>,
        <linux-mips@...ux-mips.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 13/15] MIPS: memblock: Discard bootmem from Loongson3
 code

Hi Serge,

On 02/02/18 03:54, Serge Semin wrote:
> Loongson64/3 runs its own code to initialize memory allocator in
> case of NUMA configuration is selected. So in order to move to the
> pure memblock utilization we discard the bootmem allocator usage
> and insert the memblock reservation method for kernel/addrspace_offset
> memory regions.
> 

I don't have a NUMA Loongson to test with, but on a non-NUMA Loongson3 
machine, tested as a part of the whole series, this works and looks good 
to me.

Reviewed-by: Matt Redfearn <matt.redfearn@...s.com>

Thanks,
Matt


> Signed-off-by: Serge Semin <fancer.lancer@...il.com>
> ---
>   arch/mips/loongson64/loongson-3/numa.c | 16 +++++-----------
>   1 file changed, 5 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/mips/loongson64/loongson-3/numa.c b/arch/mips/loongson64/loongson-3/numa.c
> index f17ef520799a..2f1ebf496c17 100644
> --- a/arch/mips/loongson64/loongson-3/numa.c
> +++ b/arch/mips/loongson64/loongson-3/numa.c
> @@ -180,7 +180,6 @@ static void __init szmem(unsigned int node)
>   
>   static void __init node_mem_init(unsigned int node)
>   {
> -	unsigned long bootmap_size;
>   	unsigned long node_addrspace_offset;
>   	unsigned long start_pfn, end_pfn, freepfn;
>   
> @@ -197,26 +196,21 @@ static void __init node_mem_init(unsigned int node)
>   
>   	__node_data[node] = prealloc__node_data + node;
>   
> -	NODE_DATA(node)->bdata = &bootmem_node_data[node];
>   	NODE_DATA(node)->node_start_pfn = start_pfn;
>   	NODE_DATA(node)->node_spanned_pages = end_pfn - start_pfn;
>   
> -	bootmap_size = init_bootmem_node(NODE_DATA(node), freepfn,
> -					start_pfn, end_pfn);
>   	free_bootmem_with_active_regions(node, end_pfn);
>   	if (node == 0) /* used by finalize_initrd() */
>   		max_low_pfn = end_pfn;
>   
> -	/* This is reserved for the kernel and bdata->node_bootmem_map */
> -	reserve_bootmem_node(NODE_DATA(node), start_pfn << PAGE_SHIFT,
> -		((freepfn - start_pfn) << PAGE_SHIFT) + bootmap_size,
> -		BOOTMEM_DEFAULT);
> +	/* This is reserved for the kernel only */
> +	if (node == 0)
> +		memblock_reserve(start_pfn << PAGE_SHIFT,
> +			((freepfn - start_pfn) << PAGE_SHIFT));
>   
>   	if (node == 0 && node_end_pfn(0) >= (0xffffffff >> PAGE_SHIFT)) {
>   		/* Reserve 0xfe000000~0xffffffff for RS780E integrated GPU */
> -		reserve_bootmem_node(NODE_DATA(node),
> -				(node_addrspace_offset | 0xfe000000),
> -				32 << 20, BOOTMEM_DEFAULT);
> +		memblock_reserve(node_addrspace_offset | 0xfe000000, 32 << 20);
>   	}
>   
>   	sparse_memory_present_with_active_regions(node);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ