Skip to contentSkip to conversation

x86: Support large number of memory ranges

PATCH Applied Xunlei Pang 3 participants 3 messages Mar 23, 2017 – Mar 24, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: Support large number of memory ranges

We got a problem on one SGI 64TB machine, the current kexec-tools failed to work due to the insufficient ranges(MAX_MEMORY_RANGES) allowed which is defined as 1024(less than the ranges on the machine). The kcore header is insufficient due to the same reason as well.

To solve this, this patch simply doubles "MAX_MEMORY_RANGES" and "KCORE_ELF_HEADERS_SIZE".

---
 kexec/arch/i386/kexec-x86.h | 2 +-
 kexec/crashdump.h           | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
kexec/arch/i386/kexec-x86.h +1 -1
index 33df352..51855f8 100644
@@ -1,7 +1,7 @@
 #ifndef KEXEC_X86_H
 #define KEXEC_X86_H
 
-#define MAX_MEMORY_RANGES 1024
+#define MAX_MEMORY_RANGES 2048
 
 enum coretype {
 	CORE_TYPE_UNDEF = 0,
kexec/crashdump.h +2 -2
index 86e1ef2..18bd691 100644
@@ -7,8 +7,8 @@ extern int get_xen_vmcoreinfo(uint64_t *addr, uint64_t *len);
 
 /* Need to find a better way to determine per cpu notes section size. */
 #define MAX_NOTE_BYTES		1024
-/* Expecting ELF headers to fit in 32K. Increase it if you need more. */
-#define KCORE_ELF_HEADERS_SIZE  32768
+/* Expecting ELF headers to fit in 64K. Increase it if you need more. */
+#define KCORE_ELF_HEADERS_SIZE  65536
 /* The address of the ELF header is passed to the secondary kernel
  * using the kernel command line option memmap=nnn.
  * The smallest unit the kernel accepts is in kilobytes,
Signature · 7 lines
1.8.3.1


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Tested-by on v1 1/1
#1 lore raw

acking I tested this

________________________________________
From: Xunlei Pang <[email protected]>
Sent: Thursday, March 23, 2017 7:16:59 AM
To: [email protected]
Cc: Dave Young; Xunlei Pang; Ramsay, Frank
Subject: [PATCH] x86: Support large number of memory ranges

We got a problem on one SGI 64TB machine, the current kexec-tools failed to work due to the insufficient ranges(MAX_MEMORY_RANGES) allowed which is defined as 1024(less than the ranges on the machine). The kcore header is insufficient due to the same reason as well.

To solve this, this patch simply doubles "MAX_MEMORY_RANGES" and "KCORE_ELF_HEADERS_SIZE".

---
 kexec/arch/i386/kexec-x86.h | 2 +-
 kexec/crashdump.h           | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
kexec/arch/i386/kexec-x86.h +1 -1
index 33df352..51855f8 100644
@@ -1,7 +1,7 @@
 #ifndef KEXEC_X86_H
 #define KEXEC_X86_H
 
-#define MAX_MEMORY_RANGES 1024
+#define MAX_MEMORY_RANGES 2048
 
 enum coretype {
        CORE_TYPE_UNDEF = 0,
kexec/crashdump.h +2 -2
index 86e1ef2..18bd691 100644
@@ -7,8 +7,8 @@ extern int get_xen_vmcoreinfo(uint64_t *addr, uint64_t *len);
 
 /* Need to find a better way to determine per cpu notes section size. */
 #define MAX_NOTE_BYTES         1024
-/* Expecting ELF headers to fit in 32K. Increase it if you need more. */
-#define KCORE_ELF_HEADERS_SIZE  32768
+/* Expecting ELF headers to fit in 64K. Increase it if you need more. */
+#define KCORE_ELF_HEADERS_SIZE  65536
 /* The address of the ELF header is passed to the secondary kernel
  * using the kernel command line option memmap=nnn.
  * The smallest unit the kernel accepts is in kilobytes,

--
1.8.3.1

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Applied
#2 lore raw
Quoted 12 lines · Frank

________________________________________
From: Xunlei Pang <[email protected]>
Sent: Thursday, March 23, 2017 7:16:59 AM
To: [email protected]
Cc: Dave Young; Xunlei Pang; Ramsay, Frank
Subject: [PATCH] x86: Support large number of memory ranges

We got a problem on one SGI 64TB machine, the current kexec-tools failed to work due to the insufficient ranges(MAX_MEMORY_RANGES) allowed which is defined as 1024(less than the ranges on the machine). The kcore header is insufficient due to the same reason as well.

Quoted 8 lines

To solve this, this patch simply doubles "MAX_MEMORY_RANGES" and "KCORE_ELF_HEADERS_SIZE".

acking I tested this

Thanks, applied.

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec