* [PATCH] arm: Don't use memblock limit for the lowmem bound
@ 2015-05-12 2:53 Laura Abbott
2015-05-12 9:37 ` Mark Rutland
2015-05-14 10:14 ` Russell King - ARM Linux
0 siblings, 2 replies; 3+ messages in thread
From: Laura Abbott @ 2015-05-12 2:53 UTC (permalink / raw)
To: linux-arm-kernel
From: Laura Abbott <labbott@redhat.com>
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.
Since we generally want to optimize for more lowmem, fix
this by using arm_lowmem_limit to calculate the bounds.
This what is used for actually mapping lowmem anyway.
Before:
# cat /proc/zoneinfo | grep managed
managed 62920
After:
# cat /proc/zoneinfo | grep managed
managed 63336
Signed-off-by: Laura Abbott <labbott@redhat.com>
---
arch/arm/mm/init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index be92fa0..b4f9513 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -89,7 +89,7 @@ __tagtable(ATAG_INITRD2, parse_tag_initrd2);
static void __init find_limits(unsigned long *min, unsigned long *max_low,
unsigned long *max_high)
{
- *max_low = PFN_DOWN(memblock_get_current_limit());
+ *max_low = PFN_DOWN(arm_lowmem_limit);
*min = PFN_UP(memblock_start_of_DRAM());
*max_high = PFN_DOWN(memblock_end_of_DRAM());
}
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH] arm: Don't use memblock limit for the lowmem bound 2015-05-12 2:53 [PATCH] arm: Don't use memblock limit for the lowmem bound Laura Abbott @ 2015-05-12 9:37 ` Mark Rutland 2015-05-14 10:14 ` Russell King - ARM Linux 1 sibling, 0 replies; 3+ messages in thread From: Mark Rutland @ 2015-05-12 9:37 UTC (permalink / raw) To: linux-arm-kernel On Tue, May 12, 2015 at 03:53:41AM +0100, Laura Abbott wrote: > From: Laura Abbott <labbott@redhat.com> > > 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. > Since we generally want to optimize for more lowmem, fix > this by using arm_lowmem_limit to calculate the bounds. > This what is used for actually mapping lowmem anyway. > > Before: > # cat /proc/zoneinfo | grep managed > managed 62920 > > After: > # cat /proc/zoneinfo | grep managed > managed 63336 > > > > Signed-off-by: Laura Abbott <labbott@redhat.com> I just gave this a spin on TC2, with the memory node hacked to provide 0x3ffffc00 bytes of RAM. Before: Memory: 1030380K/1046528K available (4828K kernel code, 154K rwdata, 1376K rodata, 264K init, 147K bss, 16148K reserved, 0K cma-reserved) $ cat /proc/zoneinfo | grep managed managed 257661 After: Memory: 1032424K/1048572K available (4828K kernel code, 154K rwdata, 1376K rodata, 264K init, 147K bss, 16148K reserved, 0K cma-reserved) $ cat /proc/zoneinfo | grep managed managed 258172 The patch itself looks sane to me, so: Acked-by: Mark Rutland <mark.rutland@arm.com> Tested-by: Mark Rutland <mark.rutland@arm.com> Thanks, Mark. > --- > arch/arm/mm/init.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c > index be92fa0..b4f9513 100644 > --- a/arch/arm/mm/init.c > +++ b/arch/arm/mm/init.c > @@ -89,7 +89,7 @@ __tagtable(ATAG_INITRD2, parse_tag_initrd2); > static void __init find_limits(unsigned long *min, unsigned long *max_low, > unsigned long *max_high) > { > - *max_low = PFN_DOWN(memblock_get_current_limit()); > + *max_low = PFN_DOWN(arm_lowmem_limit); > *min = PFN_UP(memblock_start_of_DRAM()); > *max_high = PFN_DOWN(memblock_end_of_DRAM()); > } > -- > 2.1.0 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] arm: Don't use memblock limit for the lowmem bound 2015-05-12 2:53 [PATCH] arm: Don't use memblock limit for the lowmem bound Laura Abbott 2015-05-12 9:37 ` Mark Rutland @ 2015-05-14 10:14 ` Russell King - ARM Linux 1 sibling, 0 replies; 3+ messages in thread From: Russell King - ARM Linux @ 2015-05-14 10:14 UTC (permalink / raw) To: linux-arm-kernel On Mon, May 11, 2015 at 07:53:41PM -0700, Laura Abbott wrote: > From: Laura Abbott <labbott@redhat.com> > > 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. > Since we generally want to optimize for more lowmem, fix > this by using arm_lowmem_limit to calculate the bounds. > This what is used for actually mapping lowmem anyway. > > Before: > # cat /proc/zoneinfo | grep managed > managed 62920 > > After: > # cat /proc/zoneinfo | grep managed > managed 63336 > > > > Signed-off-by: Laura Abbott <labbott@redhat.com> Ok. -> patch system please. -- FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-14 10:14 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-05-12 2:53 [PATCH] arm: Don't use memblock limit for the lowmem bound Laura Abbott 2015-05-12 9:37 ` Mark Rutland 2015-05-14 10:14 ` Russell King - ARM Linux
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox