[Patch resend] vmcore-dmesg: avoid allocating large memory chunk for log buf

Simon Horman horms at verge.net.au
Wed Nov 8 17:20:16 PST 2017


On Tue, Nov 07, 2017 at 04:03:31PM -0800, Cong Wang wrote:
> In kdump kernel, we got:
> 
>     Saving vmcore-dmesg.txt
>     Failed to malloc 67108864 bytes for the logbuf: Cannot allocate memory
> 
> Apparently 64M is too luxury for a kdump kernel which only has 128M
> in total.
> 
> We can avoid allocating such a large memory chunk, instead just allocate
> a smaller chunk inside the loop each time.
> 
> Verify the result by comparing the vmcore-dmesg output with and without
> this patch.
> 
> Cc: Simon Horman <horms at verge.net.au>
> Reviewed-by: Dave Young <dyoung at redhat.com>
> Reviewed-by: Pratyush Anand <panand at redhat.com>
> Signed-off-by: Cong Wang <xiyou.wangcong at gmail.com>

Thanks, applied.



More information about the kexec mailing list