Skip to contentSkip to conversation

ARM:mm: define arch-specific IOREMAP_MAX_ORDER only in !SMP && !LPAE case

PATCH In review Zhang Zhen 3 participants 5 messages Sep 8, 2015 – Sep 9, 2015 1 message not in the archive Arm (32-bit)

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Zhang Zhen

author
#1 lore raw

PATCH 1/1 ARM:mm: define arch-specific IOREMAP_MAX_ORDER only in !SMP && !LPAE case

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.

---
 arch/arm/include/asm/memory.h | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/include/asm/memory.h +2 -0
index b7f6fb4..3209012 100644
@@ -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 */
 
Signature · 4 lines
1.9.1


.
#2 lore raw
Quoted 23 lines · Zhang Zhen

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.

---
  arch/arm/include/asm/memory.h | 2 ++
  1 file changed, 2 insertions(+)
arch/arm/include/asm/memory.h +0 -0
index b7f6fb4..3209012 100644
@@ -76,10 +76,12 @@
   */
  #define XIP_VIRT_ADDR(physaddr)  (MODULES_VADDR + ((physaddr) & 0x000fffff))

arch/arm/include/asm/memory.h line 87

Quoted 10 lines
arch/arm/include/asm/memory.h +2 -0
 
+#if !defined(CONFIG_SMP) && !defined(CONFIG_ARM_LPAE)
  /*
   * Allow 16MB-aligned ioremap pages
   */
  #define IOREMAP_MAX_ORDER	24
+#endif
 
  #else /* CONFIG_MMU */
 

Hmm... This looks exactly like my old patch -
http://thread.gmane.org/gmane.linux.kernel.mm/127620
(Thanks to Vladimir for pointing that out!)

Hasn't there been any progress about this issue?

author
#3 lore raw
Quoted 32 lines · Sergey Dyasly
Quoted 31 lines · Zhang Zhen

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.

---
  arch/arm/include/asm/memory.h | 2 ++
  1 file changed, 2 insertions(+)
arch/arm/include/asm/memory.h +2 -0
index b7f6fb4..3209012 100644
@@ -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
 
Quoted 9 lines

arch/arm/include/asm/memory.h line 87

Quoted 2 lines
arch/arm/include/asm/memory.h +0 -0
  #else /* CONFIG_MMU */
 

Hmm... This looks exactly like my old patch -
http://thread.gmane.org/gmane.linux.kernel.mm/127620
(Thanks to Vladimir for pointing that out!)

Hasn't there been any progress about this issue?

Oh sorry i didn't notice your old patch.
I send this patch because we encountered high fragmentation issue in vmalloc area and the link about this issue.
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-January/313040.html
Let's drop my patch.

Besides, i just want to know why this patch is not included into the upstream kernel?

Thanks!

Quoted 2 lines

.

#4 lore raw
In reply to Sergey Dyasly
Quoted 34 lines · Sergey Dyasly
Quoted 33 lines · Zhang Zhen

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.

---
  arch/arm/include/asm/memory.h | 2 ++
  1 file changed, 2 insertions(+)
arch/arm/include/asm/memory.h +2 -0
index b7f6fb4..3209012 100644
@@ -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
 
Quoted 8 lines

arch/arm/include/asm/memory.h line 86

Quoted 2 lines
arch/arm/include/asm/memory.h +0 -0
  #else /* CONFIG_MMU */

Hmm... This looks exactly like my old patch -
http://thread.gmane.org/gmane.linux.kernel.mm/127620
(Thanks to Vladimir for pointing that out!)

Hasn't there been any progress about this issue?

IMHO the patch makes sense.

Did you send it to RMK's patch system?

Nicolas

#5 lore raw
Quoted 42 lines · Nicolas Pitre
Quoted 40 lines · Sergey Dyasly
Quoted 25 lines · Zhang Zhen

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.

---
   arch/arm/include/asm/memory.h | 2 ++
   1 file changed, 2 insertions(+)
arch/arm/include/asm/memory.h +0 -0
index b7f6fb4..3209012 100644
@@ -76,10 +76,12 @@
    */
   #define XIP_VIRT_ADDR(physaddr)  (MODULES_VADDR + ((physaddr) &

arch/arm/include/asm/memory.h line 87

Quoted 10 lines
arch/arm/include/asm/memory.h +2 -0
 0x000fffff))
 
+#if !defined(CONFIG_SMP) && !defined(CONFIG_ARM_LPAE)
   /*
    * Allow 16MB-aligned ioremap pages
    */
   #define IOREMAP_MAX_ORDER	24
+#endif
 
   #else /* CONFIG_MMU */

Hmm... This looks exactly like my old patch -
http://thread.gmane.org/gmane.linux.kernel.mm/127620
(Thanks to Vladimir for pointing that out!)

Quoted 4 lines
Quoted 1 line

Hasn't there been any progress about this issue?

IMHO the patch makes sense.

Did you send it to RMK's patch system?

Ok, submitted it to the patch system. Thanks!

Quoted 3 lines

Nicolas