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: <6B6A736C-26FA-429C-92BA-42DDE2271514@kernel.org>
Date:   Wed, 11 Sep 2019 15:57:29 +0100
From:   Mike Rapoport <rppt@...nel.org>
To:     Thomas Bogendoerfer <tbogendoerfer@...e.de>
CC:     Paul Burton <paul.burton@...s.com>, linux-mips@...r.kernel.org,
        linux-kernel@...r.kernel.org, Mike Rapoport <rppt@...ux.ibm.com>
Subject: Re: [PATCH] mips: sgi-ip27: switch from DISCONTIGMEM to SPARSEMEM

On September 11, 2019 3:09:39 PM GMT+01:00, Thomas Bogendoerfer <tbogendoerfer@...e.de> wrote:
>On Tue, 10 Sep 2019 12:32:44 +0100
>Mike Rapoport <rppt@...nel.org> wrote:
>
>> [..]
>
>Patch below works on the same Origin.
>
>Does memblocks_present() deal better with the one reserved page per
>node
>than sparse_memory_present_with_active_regions() ? Or is there a better
>explanation ? My debug prints didn't make sense out of it...

To be honest, I'm really puzzled.
I'll take a closer look tomorrow.

Thanks for the debugging and fixing this :)

>Thomas.
>
>diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
>index d50fafd7bf3a..e4b02b5f3487 100644
>--- a/arch/mips/Kconfig
>+++ b/arch/mips/Kconfig
>@@ -669,6 +669,7 @@ config SGI_IP22
> config SGI_IP27
> 	bool "SGI IP27 (Origin200/2000)"
> 	select ARCH_HAS_PHYS_TO_DMA
>+	select ARCH_SPARSEMEM_ENABLE
> 	select FW_ARC
> 	select FW_ARC64
> 	select BOOT_ELF64
>@@ -2633,18 +2634,9 @@ config ARCH_FLATMEM_ENABLE
> 	def_bool y
> 	depends on !NUMA && !CPU_LOONGSON2
> 
>-config ARCH_DISCONTIGMEM_ENABLE
>-	bool
>-	default y if SGI_IP27
>-	help
>-	  Say Y to support efficient handling of discontiguous physical
>memory,
>-	  for architectures which are either NUMA (Non-Uniform Memory Access)
>-	  or have huge holes in the physical address space for other reasons.
>-	  See <file:Documentation/vm/numa.rst> for more.
>-
> config ARCH_SPARSEMEM_ENABLE
> 	bool
>-	select SPARSEMEM_STATIC
>+	select SPARSEMEM_STATIC if !SGI_IP27
> 
> config NUMA
> 	bool "NUMA Support"
>diff --git a/arch/mips/sgi-ip27/ip27-memory.c
>b/arch/mips/sgi-ip27/ip27-memory.c
>index fb077a947575..370f2ba14a89 100644
>--- a/arch/mips/sgi-ip27/ip27-memory.c
>+++ b/arch/mips/sgi-ip27/ip27-memory.c
>@@ -410,8 +410,6 @@ static void __init node_mem_init(cnodeid_t node)
> 
> 	memblock_reserve(slot_firstpfn << PAGE_SHIFT,
> 			 ((slot_freepfn - slot_firstpfn) << PAGE_SHIFT));
>-
>-	sparse_memory_present_with_active_regions(node);
> }
> 
> /*
>@@ -444,6 +442,7 @@ void __init prom_meminit(void)
> 		}
> 		__node_data[node] = &null_node;
> 	}
>+	memblocks_present();
> }
> 
> void __init prom_free_prom_memory(void)


-- 
Sincerely yours,
Mike

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ