* [PATCH 0/2] kexec: Limit the crash memory ranges according to first kernel's memory limit.
@ 2012-08-29 8:24 Mahesh J Salgaonkar
2012-08-29 8:24 ` [PATCH 1/2] kexec: Respect memory limit while building crash memory ranges on ppc32 Mahesh J Salgaonkar
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Mahesh J Salgaonkar @ 2012-08-29 8:24 UTC (permalink / raw)
To: Simon Horman, Kexec-ml; +Cc: Benjamin Herrenschmidt, Suzuki Poulose
So far powerpc kernel never exported memory limit information which is
reflected by mem= kernel cmdline option. Hence, kexec-tools always use
to build ELF header for entire system RAM generating a dump bigger than
the actual memory used by the first kernel.
The proposed upstream kernel patch at
https://lists.ozlabs.org/pipermail/linuxppc-dev/2012-August/100500.html
now exports memory limit information through /proc/device-tree file.
The above patch is still in discussion.
This patch series now reads the memory limit information from
device-tree file if present and limits the crash memory ranges accordingly.
Tested these patches on ppc32(ppc440) and ppc64 with a kernel patch by Suzuki.
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Tested-by: Suzuki K. Poulose <suzuki@in.ibm.com>
---
Mahesh Salgaonkar (2):
kexec: Respect memory limit while building crash memory ranges on ppc32.
kexec: Respect memory limit while building crash memory ranges on ppc64
kexec/arch/ppc/crashdump-powerpc.c | 14 ++++++++---
kexec/arch/ppc/crashdump-powerpc.h | 1 +
kexec/arch/ppc/kexec-ppc.c | 48 ++++++++++++++++++++++++++++++++++++
kexec/arch/ppc64/crashdump-ppc64.c | 11 ++++++++
kexec/arch/ppc64/crashdump-ppc64.h | 1 +
kexec/arch/ppc64/kexec-ppc64.c | 28 +++++++++++++++++++++
6 files changed, 99 insertions(+), 4 deletions(-)
--
-Mahesh
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] kexec: Respect memory limit while building crash memory ranges on ppc32.
2012-08-29 8:24 [PATCH 0/2] kexec: Limit the crash memory ranges according to first kernel's memory limit Mahesh J Salgaonkar
@ 2012-08-29 8:24 ` Mahesh J Salgaonkar
2012-08-29 8:24 ` [PATCH 2/2] kexec: Respect memory limit while building crash memory ranges on ppc64 Mahesh J Salgaonkar
2012-10-24 3:18 ` [PATCH 0/2] kexec: Limit the crash memory ranges according to first kernel's memory limit Mahesh Jagannath Salgaonkar
2 siblings, 0 replies; 7+ messages in thread
From: Mahesh J Salgaonkar @ 2012-08-29 8:24 UTC (permalink / raw)
To: Simon Horman, Kexec-ml; +Cc: Benjamin Herrenschmidt, Suzuki K. Poulose
From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
So far powerpc kernel never exported memory limit information which is
reflected by mem= kernel cmdline option. Hence, kexec-tools always used
to build ELF header for entire system RAM generating a dump bigger than
the actual memory used by the first kernel.
This patch now reads the memory limit information from device-tree file and
limits the crash memory ranges accordingly.
Suzuki tested this patch on ppc32(ppc440) with a kernel patch by Suzuki.
The proposed upstream kernel patch at
https://lists.ozlabs.org/pipermail/linuxppc-dev/2012-August/100500.html
now exports memory limit information through /proc/device-tree file.
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Tested-by: Suzuki K. Poulose <suzuki@in.ibm.com>
---
kexec/arch/ppc/crashdump-powerpc.c | 14 ++++++++---
kexec/arch/ppc/crashdump-powerpc.h | 1 +
kexec/arch/ppc/kexec-ppc.c | 48 ++++++++++++++++++++++++++++++++++++
3 files changed, 60 insertions(+), 3 deletions(-)
diff --git a/kexec/arch/ppc/crashdump-powerpc.c b/kexec/arch/ppc/crashdump-powerpc.c
index 4c8c75d..7313660 100644
--- a/kexec/arch/ppc/crashdump-powerpc.c
+++ b/kexec/arch/ppc/crashdump-powerpc.c
@@ -132,8 +132,9 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges)
goto err;
}
n = read_memory_region_limits(fd, &start, &end);
+ /* We are done with fd, close it. */
+ close(fd);
if (n != 0) {
- close(fd);
closedir(dmem);
closedir(dir);
goto err;
@@ -153,8 +154,16 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges)
cstart = crash_base;
cend = crash_base + crash_size;
/*
- * Exclude the region that lies within crashkernel
+ * Exclude the region that lies within crashkernel.
+ * If memory limit is set then exclude memory region
+ * above it.
*/
+ if (memory_limit) {
+ if (start > memory_limit)
+ continue;
+ if (end > memory_limit)
+ end = memory_limit;
+ }
if (cstart < end && cend > start) {
if (start < cstart && end > cend) {
crash_memory_range[memory_ranges].start
@@ -195,7 +204,6 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges)
= RANGE_RAM;
memory_ranges++;
}
- close(fd);
}
closedir(dmem);
}
diff --git a/kexec/arch/ppc/crashdump-powerpc.h b/kexec/arch/ppc/crashdump-powerpc.h
index a377146..84a73aa 100644
--- a/kexec/arch/ppc/crashdump-powerpc.h
+++ b/kexec/arch/ppc/crashdump-powerpc.h
@@ -42,5 +42,6 @@ extern unsigned long long crash_base;
extern unsigned long long crash_size;
extern unsigned int rtas_base;
extern unsigned int rtas_size;
+extern uint64_t memory_limit;
#endif /* CRASHDUMP_POWERPC_H */
diff --git a/kexec/arch/ppc/kexec-ppc.c b/kexec/arch/ppc/kexec-ppc.c
index 6075477..de99c6a 100644
--- a/kexec/arch/ppc/kexec-ppc.c
+++ b/kexec/arch/ppc/kexec-ppc.c
@@ -29,6 +29,7 @@
unsigned long dt_address_cells = 0, dt_size_cells = 0;
uint64_t rmo_top;
+uint64_t memory_limit = 0;
unsigned long long crash_base = 0, crash_size = 0;
unsigned long long initrd_base = 0, initrd_size = 0;
unsigned long long ramdisk_base = 0, ramdisk_size = 0;
@@ -384,6 +385,41 @@ static int get_base_ranges(void)
return 0;
}
+static int read_kernel_memory_limit(char *fname, char *buf)
+{
+ FILE *file;
+ int n;
+
+ if (!fname || !buf)
+ return -1;
+
+ if ((file = fopen(fname, "r")) == NULL) {
+ if (errno != ENOENT) {
+ perror(fname);
+ return -1;
+ }
+ errno = 0;
+ /*
+ * fall through. On older kernel this file
+ * is not present.
+ */
+ }
+ else {
+ /* Memory limit property is of u64 type. */
+ if ((n = fread(&memory_limit, 1, sizeof(uint64_t), file)) < 0) {
+ perror(fname);
+ return -1;
+ }
+ if (n != sizeof(uint64_t)) {
+ fprintf(stderr, "%s node has invalid size: %d\n",
+ fname, n);
+ return -1;
+ }
+ fclose(file);
+ }
+ return 0;
+}
+
/* Get devtree details and create exclude_range array
* Also create usablemem_ranges for KEXEC_ON_CRASH
*/
@@ -511,6 +547,18 @@ static int get_devtree_details(unsigned long kexec_flags)
add_usable_mem_rgns(crash_base, crash_size);
#endif
}
+ /*
+ * Read the first kernel's memory limit.
+ * If the first kernel is booted with mem= option then
+ * it would export "linux,memory-limit" file
+ * reflecting value for the same.
+ */
+ memset(fname, 0, sizeof(fname));
+ sprintf(fname, "%s%s%s", device_tree, dentry->d_name,
+ "/linux,memory-limit");
+ if (read_kernel_memory_limit(fname, buf) < 0)
+ goto error_opencdir;
+
/* reserve the initrd_start and end locations. */
memset(fname, 0, sizeof(fname));
sprintf(fname, "%s%s%s",
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] kexec: Respect memory limit while building crash memory ranges on ppc64
2012-08-29 8:24 [PATCH 0/2] kexec: Limit the crash memory ranges according to first kernel's memory limit Mahesh J Salgaonkar
2012-08-29 8:24 ` [PATCH 1/2] kexec: Respect memory limit while building crash memory ranges on ppc32 Mahesh J Salgaonkar
@ 2012-08-29 8:24 ` Mahesh J Salgaonkar
2012-10-24 3:18 ` [PATCH 0/2] kexec: Limit the crash memory ranges according to first kernel's memory limit Mahesh Jagannath Salgaonkar
2 siblings, 0 replies; 7+ messages in thread
From: Mahesh J Salgaonkar @ 2012-08-29 8:24 UTC (permalink / raw)
To: Simon Horman, Kexec-ml; +Cc: Benjamin Herrenschmidt, Suzuki Poulose
From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Fix it on ppc64 also. This patch now reads the memory limit information
from device-tree file and limits the crash memory ranges accordingly.
Tested this patch on ppc64 with a kernel patch by Suzuki.
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
---
kexec/arch/ppc64/crashdump-ppc64.c | 11 ++++++++++-
kexec/arch/ppc64/crashdump-ppc64.h | 1 +
kexec/arch/ppc64/kexec-ppc64.c | 28 ++++++++++++++++++++++++++++
3 files changed, 39 insertions(+), 1 deletions(-)
diff --git a/kexec/arch/ppc64/crashdump-ppc64.c b/kexec/arch/ppc64/crashdump-ppc64.c
index 30ef443..690b1f7 100644
--- a/kexec/arch/ppc64/crashdump-ppc64.c
+++ b/kexec/arch/ppc64/crashdump-ppc64.c
@@ -84,10 +84,19 @@ static unsigned long long cstart, cend;
static int memory_ranges;
/*
- * Exclude the region that lies within crashkernel
+ * Exclude the region that lies within crashkernel and above the memory
+ * limit which is reflected by mem= kernel option.
*/
static void exclude_crash_region(uint64_t start, uint64_t end)
{
+ /* If memory_limit is set then exclude the memory region above it. */
+ if (memory_limit) {
+ if (start > memory_limit)
+ return;
+ if (end > memory_limit)
+ end = memory_limit;
+ }
+
if (cstart < end && cend > start) {
if (start < cstart && end > cend) {
crash_memory_range[memory_ranges].start = start;
diff --git a/kexec/arch/ppc64/crashdump-ppc64.h b/kexec/arch/ppc64/crashdump-ppc64.h
index be02213..739c61f 100644
--- a/kexec/arch/ppc64/crashdump-ppc64.h
+++ b/kexec/arch/ppc64/crashdump-ppc64.h
@@ -27,6 +27,7 @@ void add_usable_mem_rgns(unsigned long long base, unsigned long long size);
extern uint64_t crash_base;
extern uint64_t crash_size;
+extern uint64_t memory_limit;
extern unsigned int rtas_base;
extern unsigned int rtas_size;
diff --git a/kexec/arch/ppc64/kexec-ppc64.c b/kexec/arch/ppc64/kexec-ppc64.c
index 2f12907..189d48e 100644
--- a/kexec/arch/ppc64/kexec-ppc64.c
+++ b/kexec/arch/ppc64/kexec-ppc64.c
@@ -39,6 +39,7 @@ static struct memory_range *memory_range = NULL;
static struct memory_range *base_memory_range = NULL;
static uint64_t rmo_top;
uint64_t memory_max = 0;
+uint64_t memory_limit = 0;
static int nr_memory_ranges, nr_exclude_ranges;
uint64_t crash_base, crash_size;
unsigned int rtas_base, rtas_size;
@@ -408,6 +409,33 @@ static int get_devtree_details(unsigned long kexec_flags)
add_usable_mem_rgns(0, crash_base + crash_size);
reserve(KDUMP_BACKUP_LIMIT, crash_base-KDUMP_BACKUP_LIMIT);
}
+ /*
+ * Read the first kernel's memory limit.
+ * If the first kernel is booted with mem= option then
+ * it would export "linux,memory-limit" file
+ * reflecting value for the same.
+ */
+ memset(fname, 0, sizeof(fname));
+ strcpy(fname, device_tree);
+ strcat(fname, dentry->d_name);
+ strcat(fname, "/linux,memory-limit");
+ if ((file = fopen(fname, "r")) == NULL) {
+ if (errno != ENOENT) {
+ perror(fname);
+ goto error_opencdir;
+ }
+ errno = 0;
+ /*
+ * File not present.
+ * fall through. On older kernel this file
+ * is not present.
+ */
+ }
+ else if (fread(&memory_limit, sizeof(uint64_t), 1, file)
+ != 1) {
+ perror(fname);
+ goto error_openfile;
+ }
memset(fname, 0, sizeof(fname));
strcpy(fname, device_tree);
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] kexec: Limit the crash memory ranges according to first kernel's memory limit.
2012-08-29 8:24 [PATCH 0/2] kexec: Limit the crash memory ranges according to first kernel's memory limit Mahesh J Salgaonkar
2012-08-29 8:24 ` [PATCH 1/2] kexec: Respect memory limit while building crash memory ranges on ppc32 Mahesh J Salgaonkar
2012-08-29 8:24 ` [PATCH 2/2] kexec: Respect memory limit while building crash memory ranges on ppc64 Mahesh J Salgaonkar
@ 2012-10-24 3:18 ` Mahesh Jagannath Salgaonkar
2012-11-13 3:36 ` Baoquan
2012-11-30 3:08 ` Mahesh Jagannath Salgaonkar
2 siblings, 2 replies; 7+ messages in thread
From: Mahesh Jagannath Salgaonkar @ 2012-10-24 3:18 UTC (permalink / raw)
To: Simon Horman, Kexec-ml; +Cc: Benjamin Herrenschmidt, Suzuki Poulose
On 08/29/2012 01:54 PM, Mahesh J Salgaonkar wrote:
> So far powerpc kernel never exported memory limit information which is
> reflected by mem= kernel cmdline option. Hence, kexec-tools always use
> to build ELF header for entire system RAM generating a dump bigger than
> the actual memory used by the first kernel.
>
> The proposed upstream kernel patch at
> https://lists.ozlabs.org/pipermail/linuxppc-dev/2012-August/100500.html
> now exports memory limit information through /proc/device-tree file.
> The above patch is still in discussion.
The above mentioned kernel patches are now upstream. Below are commit ids:
4bc77a5e - powerpc: Export memory limit via device tree
a84fcd468 - powerpc: Change memory_limit from phys_addr_t to unsigned
long long
>
> This patch series now reads the memory limit information from
> device-tree file if present and limits the crash memory ranges accordingly.
>
> Tested these patches on ppc32(ppc440) and ppc64 with a kernel patch by Suzuki.
>
> Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
> Tested-by: Suzuki K. Poulose <suzuki@in.ibm.com>
>
> ---
>
> Mahesh Salgaonkar (2):
> kexec: Respect memory limit while building crash memory ranges on ppc32.
> kexec: Respect memory limit while building crash memory ranges on ppc64
>
>
> kexec/arch/ppc/crashdump-powerpc.c | 14 ++++++++---
> kexec/arch/ppc/crashdump-powerpc.h | 1 +
> kexec/arch/ppc/kexec-ppc.c | 48 ++++++++++++++++++++++++++++++++++++
> kexec/arch/ppc64/crashdump-ppc64.c | 11 ++++++++
> kexec/arch/ppc64/crashdump-ppc64.h | 1 +
> kexec/arch/ppc64/kexec-ppc64.c | 28 +++++++++++++++++++++
> 6 files changed, 99 insertions(+), 4 deletions(-)
>
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] kexec: Limit the crash memory ranges according to first kernel's memory limit.
2012-10-24 3:18 ` [PATCH 0/2] kexec: Limit the crash memory ranges according to first kernel's memory limit Mahesh Jagannath Salgaonkar
@ 2012-11-13 3:36 ` Baoquan
2012-11-14 9:31 ` Baoquan
2012-11-30 3:08 ` Mahesh Jagannath Salgaonkar
1 sibling, 1 reply; 7+ messages in thread
From: Baoquan @ 2012-11-13 3:36 UTC (permalink / raw)
To: Mahesh Jagannath Salgaonkar
Cc: Benjamin Herrenschmidt, Simon Horman, Kexec-ml, Suzuki Poulose
Hi,
I have tested ppc64 part of this patchset, and it works.
Do you plan to merge this patchset?
On 10/24/2012 11:18 AM, Mahesh Jagannath Salgaonkar wrote:
> On 08/29/2012 01:54 PM, Mahesh J Salgaonkar wrote:
>> So far powerpc kernel never exported memory limit information which is
>> reflected by mem= kernel cmdline option. Hence, kexec-tools always use
>> to build ELF header for entire system RAM generating a dump bigger than
>> the actual memory used by the first kernel.
>>
>> The proposed upstream kernel patch at
>> https://lists.ozlabs.org/pipermail/linuxppc-dev/2012-August/100500.html
>> now exports memory limit information through /proc/device-tree file.
>> The above patch is still in discussion.
> The above mentioned kernel patches are now upstream. Below are commit ids:
> 4bc77a5e - powerpc: Export memory limit via device tree
> a84fcd468 - powerpc: Change memory_limit from phys_addr_t to unsigned
> long long
>
>> This patch series now reads the memory limit information from
>> device-tree file if present and limits the crash memory ranges accordingly.
>>
>> Tested these patches on ppc32(ppc440) and ppc64 with a kernel patch by Suzuki.
>>
>> Signed-off-by: Mahesh Salgaonkar<mahesh@linux.vnet.ibm.com>
>> Tested-by: Suzuki K. Poulose<suzuki@in.ibm.com>
>>
>> ---
>>
>> Mahesh Salgaonkar (2):
>> kexec: Respect memory limit while building crash memory ranges on ppc32.
>> kexec: Respect memory limit while building crash memory ranges on ppc64
>>
>>
>> kexec/arch/ppc/crashdump-powerpc.c | 14 ++++++++---
>> kexec/arch/ppc/crashdump-powerpc.h | 1 +
>> kexec/arch/ppc/kexec-ppc.c | 48 ++++++++++++++++++++++++++++++++++++
>> kexec/arch/ppc64/crashdump-ppc64.c | 11 ++++++++
>> kexec/arch/ppc64/crashdump-ppc64.h | 1 +
>> kexec/arch/ppc64/kexec-ppc64.c | 28 +++++++++++++++++++++
>> 6 files changed, 99 insertions(+), 4 deletions(-)
>>
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] kexec: Limit the crash memory ranges according to first kernel's memory limit.
2012-11-13 3:36 ` Baoquan
@ 2012-11-14 9:31 ` Baoquan
0 siblings, 0 replies; 7+ messages in thread
From: Baoquan @ 2012-11-14 9:31 UTC (permalink / raw)
To: Mahesh Jagannath Salgaonkar
Cc: Benjamin Herrenschmidt, Simon Horman, Kexec-ml, Suzuki Poulose
On 11/13/2012 11:36 AM, Baoquan wrote:
> Hi,
>
> I have tested ppc64 part of this patchset, and it works.
> Do you plan to merge this patchset?
>
Sorry, above question should go to Simon.
> On 10/24/2012 11:18 AM, Mahesh Jagannath Salgaonkar wrote:
>> On 08/29/2012 01:54 PM, Mahesh J Salgaonkar wrote:
>>> So far powerpc kernel never exported memory limit information which is
>>> reflected by mem= kernel cmdline option. Hence, kexec-tools always use
>>> to build ELF header for entire system RAM generating a dump bigger than
>>> the actual memory used by the first kernel.
>>>
>>> The proposed upstream kernel patch at
>>> https://lists.ozlabs.org/pipermail/linuxppc-dev/2012-August/100500.html
>>> now exports memory limit information through /proc/device-tree file.
>>> The above patch is still in discussion.
>> The above mentioned kernel patches are now upstream. Below are commit
>> ids:
>> 4bc77a5e - powerpc: Export memory limit via device tree
>> a84fcd468 - powerpc: Change memory_limit from phys_addr_t to unsigned
>> long long
>>
>>> This patch series now reads the memory limit information from
>>> device-tree file if present and limits the crash memory ranges
>>> accordingly.
>>>
>>> Tested these patches on ppc32(ppc440) and ppc64 with a kernel patch
>>> by Suzuki.
>>>
>>> Signed-off-by: Mahesh Salgaonkar<mahesh@linux.vnet.ibm.com>
>>> Tested-by: Suzuki K. Poulose<suzuki@in.ibm.com>
>>>
>>> ---
>>>
>>> Mahesh Salgaonkar (2):
>>> kexec: Respect memory limit while building crash memory
>>> ranges on ppc32.
>>> kexec: Respect memory limit while building crash memory
>>> ranges on ppc64
>>>
>>>
>>> kexec/arch/ppc/crashdump-powerpc.c | 14 ++++++++---
>>> kexec/arch/ppc/crashdump-powerpc.h | 1 +
>>> kexec/arch/ppc/kexec-ppc.c | 48
>>> ++++++++++++++++++++++++++++++++++++
>>> kexec/arch/ppc64/crashdump-ppc64.c | 11 ++++++++
>>> kexec/arch/ppc64/crashdump-ppc64.h | 1 +
>>> kexec/arch/ppc64/kexec-ppc64.c | 28 +++++++++++++++++++++
>>> 6 files changed, 99 insertions(+), 4 deletions(-)
>>>
>>
>> _______________________________________________
>> kexec mailing list
>> kexec@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/kexec
>
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] kexec: Limit the crash memory ranges according to first kernel's memory limit.
2012-10-24 3:18 ` [PATCH 0/2] kexec: Limit the crash memory ranges according to first kernel's memory limit Mahesh Jagannath Salgaonkar
2012-11-13 3:36 ` Baoquan
@ 2012-11-30 3:08 ` Mahesh Jagannath Salgaonkar
1 sibling, 0 replies; 7+ messages in thread
From: Mahesh Jagannath Salgaonkar @ 2012-11-30 3:08 UTC (permalink / raw)
To: Simon Horman, Kexec-ml; +Cc: Benjamin Herrenschmidt, Suzuki Poulose
On 10/24/2012 08:48 AM, Mahesh Jagannath Salgaonkar wrote:
> On 08/29/2012 01:54 PM, Mahesh J Salgaonkar wrote:
>> So far powerpc kernel never exported memory limit information which is
>> reflected by mem= kernel cmdline option. Hence, kexec-tools always use
>> to build ELF header for entire system RAM generating a dump bigger than
>> the actual memory used by the first kernel.
>>
>> The proposed upstream kernel patch at
>> https://lists.ozlabs.org/pipermail/linuxppc-dev/2012-August/100500.html
>> now exports memory limit information through /proc/device-tree file.
>> The above patch is still in discussion.
>
> The above mentioned kernel patches are now upstream. Below are commit ids:
> 4bc77a5e - powerpc: Export memory limit via device tree
> a84fcd468 - powerpc: Change memory_limit from phys_addr_t to unsigned
> long long
Hi Simon,
Did you get chance to review these patchset? The kernel patches are
already in upstream.
Thanks,
-Mahesh.
>
>>
>> This patch series now reads the memory limit information from
>> device-tree file if present and limits the crash memory ranges accordingly.
>>
>> Tested these patches on ppc32(ppc440) and ppc64 with a kernel patch by Suzuki.
>>
>> Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
>> Tested-by: Suzuki K. Poulose <suzuki@in.ibm.com>
>>
>> ---
>>
>> Mahesh Salgaonkar (2):
>> kexec: Respect memory limit while building crash memory ranges on ppc32.
>> kexec: Respect memory limit while building crash memory ranges on ppc64
>>
>>
>> kexec/arch/ppc/crashdump-powerpc.c | 14 ++++++++---
>> kexec/arch/ppc/crashdump-powerpc.h | 1 +
>> kexec/arch/ppc/kexec-ppc.c | 48 ++++++++++++++++++++++++++++++++++++
>> kexec/arch/ppc64/crashdump-ppc64.c | 11 ++++++++
>> kexec/arch/ppc64/crashdump-ppc64.h | 1 +
>> kexec/arch/ppc64/kexec-ppc64.c | 28 +++++++++++++++++++++
>> 6 files changed, 99 insertions(+), 4 deletions(-)
>>
>
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
>
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-11-30 3:08 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-29 8:24 [PATCH 0/2] kexec: Limit the crash memory ranges according to first kernel's memory limit Mahesh J Salgaonkar
2012-08-29 8:24 ` [PATCH 1/2] kexec: Respect memory limit while building crash memory ranges on ppc32 Mahesh J Salgaonkar
2012-08-29 8:24 ` [PATCH 2/2] kexec: Respect memory limit while building crash memory ranges on ppc64 Mahesh J Salgaonkar
2012-10-24 3:18 ` [PATCH 0/2] kexec: Limit the crash memory ranges according to first kernel's memory limit Mahesh Jagannath Salgaonkar
2012-11-13 3:36 ` Baoquan
2012-11-14 9:31 ` Baoquan
2012-11-30 3:08 ` Mahesh Jagannath Salgaonkar
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).