[PATCH] kexec memory ranges dynamic allocation

Chandru chandru at in.ibm.com
Fri Oct 17 12:12:48 EDT 2008


Maxim Uvarov wrote:
> Hello all,
>
> As you all know it is not easy to count exact value of memory ranges 
> from device tree on powerpc.
> It very depends on how dts file was written. What do you think about 
> really dynamic allocation buffers
> for this buffers? Patch is attached.
>
> -- 
> Best regards,
> Maxim Uvarov

Maxim,

The changes seem to be better in allocating memory ranges dynamically.   
>From the patch, it looks like there are couple of other places in 
get_devtree_details() to make a  call to realloc_memory_ranges(). Also 
the patch removes the initialization of lmb_size and num_of_lmbs which 
are required for  the recent dynamic-reconf-memory changes to 
kexec-tools.  Else these values could also be read from 
/proc/device-tree wherever necessary .   I applied the patch on a ppc64 
machine and got the following

# ./build/sbin/kexec -p /boot/vmlinux-kdump --append="root=/dev/sda3   
elevator=deadline sysrq=1 reset_devices " --initrd=/boot/initrd-kdump
get memory ranges:2
Could not find a free area of memory of 82b2b8 bytes...
Base address: ffffffff is not page aligned

Without the patch , kexec loads the crashkernel in to memory.  Trying to 
see whats wrong...
 
Chandru



More information about the kexec mailing list