All of lore.kernel.org
 help / color / mirror / Atom feed
From: zhenzhang.zhang@huawei.com (Zhang Zhen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM:mm: define arch-specific IOREMAP_MAX_ORDER only in !SMP && !LPAE case
Date: Tue, 8 Sep 2015 10:45:38 +0800	[thread overview]
Message-ID: <55EE4BD2.3080800@huawei.com> (raw)
In-Reply-To: <1441680050-50490-1-git-send-email-zhenzhang.zhang@huawei.com>

The arch-specific IOREMAP_MAX_ORDER is introduced in
commit: ff0daca([ARM] Add section support to ioremap) and
commit: a069c89 ([ARM] 3705/1: add supersection support to ioremap()).
But supersections and sections mappings are only used in !SMP && !LPAE case.
Otherwise, mapping is created using the usual 4K pages.

In most cases without !SMP && !LPAE, the big alignment cause high fragmentation
issue in vmalloc area.
Here we use arch-specific IOREMAP_MAX_ORDER only in !SMP && !LPAE case,
otherwise use generic IOREMAP_MAX_ORDER in include/linux/vmalloc.h.

Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
---
 arch/arm/include/asm/memory.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index b7f6fb4..3209012 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -76,10 +76,12 @@
  */
 #define XIP_VIRT_ADDR(physaddr)  (MODULES_VADDR + ((physaddr) & 0x000fffff))

+#if !defined(CONFIG_SMP) && !defined(CONFIG_ARM_LPAE)
 /*
  * Allow 16MB-aligned ioremap pages
  */
 #define IOREMAP_MAX_ORDER	24
+#endif

 #else /* CONFIG_MMU */

-- 
1.9.1


.

WARNING: multiple messages have this Message-ID (diff)
From: Zhang Zhen <zhenzhang.zhang@huawei.com>
To: <linux@arm.linux.org.uk>, <nico@linaro.org>,
	<ssantosh@kernel.org>, <vitalya@ti.com>, <treding@nvidia.com>
Cc: <linux-arm-kernel@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] ARM:mm: define arch-specific IOREMAP_MAX_ORDER only in !SMP && !LPAE case
Date: Tue, 8 Sep 2015 10:45:38 +0800	[thread overview]
Message-ID: <55EE4BD2.3080800@huawei.com> (raw)
In-Reply-To: <1441680050-50490-1-git-send-email-zhenzhang.zhang@huawei.com>

The arch-specific IOREMAP_MAX_ORDER is introduced in
commit: ff0daca([ARM] Add section support to ioremap) and
commit: a069c89 ([ARM] 3705/1: add supersection support to ioremap()).
But supersections and sections mappings are only used in !SMP && !LPAE case.
Otherwise, mapping is created using the usual 4K pages.

In most cases without !SMP && !LPAE, the big alignment cause high fragmentation
issue in vmalloc area.
Here we use arch-specific IOREMAP_MAX_ORDER only in !SMP && !LPAE case,
otherwise use generic IOREMAP_MAX_ORDER in include/linux/vmalloc.h.

Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
---
 arch/arm/include/asm/memory.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index b7f6fb4..3209012 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -76,10 +76,12 @@
  */
 #define XIP_VIRT_ADDR(physaddr)  (MODULES_VADDR + ((physaddr) & 0x000fffff))

+#if !defined(CONFIG_SMP) && !defined(CONFIG_ARM_LPAE)
 /*
  * Allow 16MB-aligned ioremap pages
  */
 #define IOREMAP_MAX_ORDER	24
+#endif

 #else /* CONFIG_MMU */

-- 
1.9.1


.





       reply	other threads:[~2015-09-08  2:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1441680050-50490-1-git-send-email-zhenzhang.zhang@huawei.com>
2015-09-08  2:45 ` Zhang Zhen [this message]
2015-09-08  2:45   ` [PATCH] ARM:mm: define arch-specific IOREMAP_MAX_ORDER only in !SMP && !LPAE case Zhang Zhen
2015-09-08 18:12   ` Sergey Dyasly
2015-09-08 18:12     ` Sergey Dyasly
2015-09-09  1:22     ` Zhang Zhen
2015-09-09  1:22       ` Zhang Zhen
2015-09-09  3:10     ` Nicolas Pitre
2015-09-09  3:10       ` Nicolas Pitre
2015-09-09 18:28       ` Sergey Dyasly
2015-09-09 18:28         ` Sergey Dyasly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55EE4BD2.3080800@huawei.com \
    --to=zhenzhang.zhang@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.