linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: keystone: allow FORCE_MAX_ZONEORDER to be configurable on Keystone
@ 2015-07-01 17:53 Murali Karicheri
  2015-07-01 18:48 ` Russell King - ARM Linux
  0 siblings, 1 reply; 3+ messages in thread
From: Murali Karicheri @ 2015-07-01 17:53 UTC (permalink / raw)
  To: linux-arm-kernel

Currently for Keystone devices, user can't change the
value of CONFIG_FORCE_MAX_ZONEORDER option in defconfig.
Users require capability to tune the value of this option on a target
board. So this patch adds this capability

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
---
 arch/arm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a750c14..9b5f8bc 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1731,7 +1731,7 @@ config ARM_MODULE_PLTS
 source "mm/Kconfig"
 
 config FORCE_MAX_ZONEORDER
-	int "Maximum zone order" if ARCH_SHMOBILE_LEGACY
+	int "Maximum zone order" if ARCH_SHMOBILE_LEGACY || ARCH_KEYSTONE
 	range 11 64 if ARCH_SHMOBILE_LEGACY
 	default "12" if SOC_AM33XX
 	default "9" if SA1111 || ARCH_EFM32
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] ARM: keystone: allow FORCE_MAX_ZONEORDER to be configurable on Keystone
  2015-07-01 17:53 [PATCH] ARM: keystone: allow FORCE_MAX_ZONEORDER to be configurable on Keystone Murali Karicheri
@ 2015-07-01 18:48 ` Russell King - ARM Linux
  2015-07-02 18:54   ` Murali Karicheri
  0 siblings, 1 reply; 3+ messages in thread
From: Russell King - ARM Linux @ 2015-07-01 18:48 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jul 01, 2015 at 01:53:02PM -0400, Murali Karicheri wrote:
> Currently for Keystone devices, user can't change the
> value of CONFIG_FORCE_MAX_ZONEORDER option in defconfig.
> Users require capability to tune the value of this option on a target
> board. So this patch adds this capability

No they shouldn't.  If we do permit this, it should not be unrestricted -
it's a power-of-2 of the page size, so specifying something like 32768 is
insane.

In any case, it's well known that the Linux MM system fragments memory,
and the higher order allocations will fail soon after boot - and the
larger the order, the greater chance of it failing.

The only case that you want large allocations is for things like DMA, and
we have a separate allocator for that called CMA, which is able to grab
large chunks of memory, provided it's configured with a large enough zone.

Please check whether CMA can be used _before_ considering using this
option.  If you need to increase the order, it should be justified, and
it should be done on a per SoC basis in a static way, not left to the
user to dream up some power-of-2 figure.

Most importantly, please explain in the commit message why CMA doesn't
provide you with what you need.

-- 
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

* [PATCH] ARM: keystone: allow FORCE_MAX_ZONEORDER to be configurable on Keystone
  2015-07-01 18:48 ` Russell King - ARM Linux
@ 2015-07-02 18:54   ` Murali Karicheri
  0 siblings, 0 replies; 3+ messages in thread
From: Murali Karicheri @ 2015-07-02 18:54 UTC (permalink / raw)
  To: linux-arm-kernel

Russell,

On 07/01/2015 02:48 PM, Russell King - ARM Linux wrote:
> On Wed, Jul 01, 2015 at 01:53:02PM -0400, Murali Karicheri wrote:
>> Currently for Keystone devices, user can't change the
>> value of CONFIG_FORCE_MAX_ZONEORDER option in defconfig.
>> Users require capability to tune the value of this option on a target
>> board. So this patch adds this capability
>
> No they shouldn't.  If we do permit this, it should not be unrestricted -
> it's a power-of-2 of the page size, so specifying something like 32768 is
> insane.
>

Thanks for your comments

This was present in out internal version of the kernel. Only thing I can 
recall is that this patch was added to fix an isue in a DEBUG buid. 
Memory allocation for a large data structures used by a driver during 
probe (internal version) was failing as the data structure gets expanded 
as a result of DEBUG option related variables. There is no hurry to add 
this for now.

> In any case, it's well known that the Linux MM system fragments memory,
> and the higher order allocations will fail soon after boot - and the
> larger the order, the greater chance of it failing.Ok
>

Agree

> The only case that you want large allocations is for things like DMA, and
> we have a separate allocator for that called CMA, which is able to grab
> large chunks of memory, provided it's configured with a large enough zone.
>
> Please check whether CMA can be used _before_ considering using this
> option.  If you need to increase the order, it should be justified, and
> it should be done on a per SoC basis in a static way, not left to the
> user to dream up some power-of-2 figure.
I will explore these options when we upstream the internal driver. For 
now I will drop this patch.

Thanks
-- 
Murali Karicheri
Linux Kernel, Keystone

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-02 18:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-01 17:53 [PATCH] ARM: keystone: allow FORCE_MAX_ZONEORDER to be configurable on Keystone Murali Karicheri
2015-07-01 18:48 ` Russell King - ARM Linux
2015-07-02 18:54   ` Murali Karicheri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).