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

Pratyush Anand panand at redhat.com
Tue Jun 27 22:27:58 PDT 2017



On Tuesday 20 June 2017 03:53 AM, 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.

Nice improvement.

>
> Verify the result by comparing the vmcore-dmesg output with and without
> this patch.

Yes, it works.

Modification looks fine to me.

Reviewed-by: Pratyush Anand <panand at redhat.com>





More information about the kexec mailing list