Thread (13 messages) 13 messages, 2 authors, 2008-02-11

Re: [PATCH 2/8] pseries: phyp dump: reserve-release proof-of-concept

From: Paul Mackerras <hidden>
Date: 2008-02-07 00:42:05

Manish Ahuja writes:
Initial patch for reserving memory in early boot, and freeing it later.
If the previous boot had ended with a crash, the reserved memory would contain
a copy of the crashed kernel data.
[snip]
+static void __init reserve_crashed_mem(void)
+{
+	unsigned long base, size;
+
+	if (phyp_dump_info->phyp_dump_is_active) {
+		/* Reserve *everything* above RMR. We'll free this real soon.*/
+		base = PHYP_DUMP_RMR_END;
+		size = lmb_end_of_DRAM() - base;
+
+		/* XXX crashed_ram_end is wrong, since it may be beyond
+	 	* the memory_limit, it will need to be adjusted. */
+		lmb_reserve(base, size);
+
+		phyp_dump_info->init_reserve_start = base;
+		phyp_dump_info->init_reserve_size = size;
+	}
+	else {
+		size = phyp_dump_info->cpu_state_size +
+			phyp_dump_info->hpte_region_size +
+			PHYP_DUMP_RMR_END;
+		base = lmb_end_of_DRAM() - size;
+	printk(KERN_ERR "Manish reserve regular kernel space is %ld %ld\n", base, size);
+		lmb_reserve(base, size);
This is still reserving memory even on systems that aren't running on
pHyp at all.  Please rework this so that no memory is reserved if the
system doesn't support phyp-assisted dump.

Paul.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help