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: <20150611130700.GA8153@leverpostej>
Date:	Thu, 11 Jun 2015 14:07:00 +0100
From:	Mark Rutland <mark.rutland@....com>
To:	Laura Abbott <labbott@...oraproject.org>
Cc:	Russell King <linux@....linux.org.uk>,
	Arnd Bergmann <arnd@...db.de>, Nicolas Pitre <nico@...aro.org>,
	Stefan Agner <stefan@...er.ch>,
	Catalin Marinas <Catalin.Marinas@....com>,
	Will Deacon <Will.Deacon@....com>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Hans de Goede <hdegoede@...hat.com>
Subject: Re: [PATCH] arm: Update memblock limit after mapping lowmem

On Thu, Jun 04, 2015 at 08:15:49PM +0100, Laura Abbott wrote:
> 
> The memblock limit is currently used in find_limits
> to find the bounds for ZONE_NORMAL. The memblock
> limit may need to be rounded down a PMD size to ensure
> allocations are fully mapped though. This has the side
> effect of reducing the amount of memory in ZONE_NORMAL.
> Once all lowmem is mapped, it's safe to change the memblock
> limit back to include the unaligned section. Adjust the
> memblock limit after lowmem mapping is complete.
> 
> Before:
>  # cat /proc/zoneinfo | grep managed
>         managed  62907
>         managed  424
> 
> After:
>  # cat /proc/zoneinfo | grep managed
>         managed  63331
> 
> Signed-off-by: Laura Abbott <labbott@...oraproject.org>
> ---
> This is a replacement for
> 'arm: Don't use memblock limit for the lowmem bound' which
> doesn't actually work on NOMMU systems.

Works for me on TC2, atop v4.1-rc7. Before this patch, with a few byes
carved out of the memory node I would see:

Memory: 1030380K/1046528K available (4832K kernel code, 154K rwdata, 1376K rodata, 260K init, 147K bss, 16148K reserved, 0K cma-reserved)

$ cat /proc/zoneinfo | grep managed
        managed  257660

With the patch I see:

Memory: 1032424K/1048572K available (4832K kernel code, 154K rwdata, 1376K rodata, 260K init, 147K bss, 16148K reserved, 0K cma-reserved)

$ cat /proc/zoneinfo | grep managed
        managed  258171

The patch itself looks good to me.

Reviewed-by: Mark Rutland <mark.rutland@....com>
Tested-by: Mark Rutland <mark.rutland@....com>

Thanks,
Mark.

> ---
>  arch/arm/mm/mmu.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
> index 7186382..904d153 100644
> --- a/arch/arm/mm/mmu.c
> +++ b/arch/arm/mm/mmu.c
> @@ -1519,6 +1519,7 @@ void __init paging_init(const struct machine_desc *mdesc)
>  	build_mem_type_table();
>  	prepare_page_table();
>  	map_lowmem();
> +	memblock_set_current_limit(arm_lowmem_limit);
>  	dma_contiguous_remap();
>  	devicemaps_init(mdesc);
>  	kmap_init();
> -- 
> 2.4.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ