Commit e08d26b3 authored by Cong Wang's avatar Cong Wang Committed by Simon Horman
Browse files

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



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@verge.net.au>
Reviewed-by: default avatarDave Young <dyoung@redhat.com>
Reviewed-by: default avatarPratyush Anand <panand@redhat.com>
Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
parent 9004e19c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment