[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <36c6065f-0680-4ac0-c480-1382aa13fcb0@gmail.com>
Date: Sun, 17 Jan 2021 19:09:32 -0800
From: Florian Fainelli <f.fainelli@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, opendmb@...il.com,
Barret Rhoden <brho@...gle.com>, Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH] initramfs: Panic with memory information
On 1/17/2021 1:33 PM, Andrew Morton wrote:
> On Thu, 14 Jan 2021 15:15:16 -0800 Florian Fainelli <f.fainelli@...il.com> wrote:
>
>> On systems with large amounts of reserved memory we may fail to
>> successfully complete unpack_to_rootfs() and be left with:
>>
>> Kernel panic - not syncing: write error
>>
>> this is not too helpful to understand what happened, so let's wrap the
>> panic() calls with a surrounding show_mem() such that we have a chance
>> of understanding the memory conditions leading to these allocation
>> failures.
>
> Seems sensible.
>
>> @@ -45,6 +46,11 @@ static void __init error(char *x)
>> message = x;
>> }
>>
>> +#define panic_show_mem(...) { \
>> + show_mem(0, NULL); \
>> + panic(__VA_ARGS__); \
>> +}
>> +
>
> But can we replace nasty macro with pleasing C code?
That works for me, would you like to squash this into my patch before
sending this to Linus?
--
Florian
Powered by blists - more mailing lists