[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <217fb106-980c-0bd9-8398-d52ef255d51f@huawei.com>
Date: Thu, 16 Dec 2021 21:15:18 +0800
From: "Leizhen (ThunderTown)" <thunder.leizhen@...wei.com>
To: Borislav Petkov <bp@...en8.de>
CC: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, <x86@...nel.org>,
"H . Peter Anvin" <hpa@...or.com>, <linux-kernel@...r.kernel.org>,
Dave Young <dyoung@...hat.com>, Baoquan He <bhe@...hat.com>,
Vivek Goyal <vgoyal@...hat.com>,
Eric Biederman <ebiederm@...ssion.com>,
<kexec@...ts.infradead.org>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
<linux-arm-kernel@...ts.infradead.org>,
Rob Herring <robh+dt@...nel.org>,
Frank Rowand <frowand.list@...il.com>,
<devicetree@...r.kernel.org>, "Jonathan Corbet" <corbet@....net>,
<linux-doc@...r.kernel.org>, Randy Dunlap <rdunlap@...radead.org>,
Feng Zhou <zhoufeng.zf@...edance.com>,
Kefeng Wang <wangkefeng.wang@...wei.com>,
Chen Zhou <dingguo.cz@...group.com>
Subject: Re: [PATCH v17 05/10] x86: kdump: move reserve_crashkernel[_low]()
into crash_core.c
On 2021/12/16 19:17, Borislav Petkov wrote:
> On Fri, Dec 10, 2021 at 02:55:28PM +0800, Zhen Lei wrote:
>> + * reserve_crashkernel() - reserves memory for crash kernel
>> + *
>> + * This function reserves memory area given in "crashkernel=" kernel command
>> + * line parameter. The memory reserved is used by dump capture kernel when
>> + * primary kernel is crashing.
>> + */
>> +void __init reserve_crashkernel(void)
>
> As I've already alluded to in another mail, ontop of this there should
> be a patch or multiple patches which clean this up more and perhaps even
> split it into separate functions doing stuff in this order:
>
> 1. Parse all crashkernel= cmdline options
>
> 2. Do all crash_base, crash_size etc checks
>
> 3. Do the memory reservations
>
> And all that supplied with comments explaining why stuff is being done.
I agree with you. This makes the code look clear. I will do it, try to
post v18 next Monday.
>
> This set of functions is a mess and there's no better time for cleaning
> it up and documenting it properly than when you move it to generic code.
>
> Thx.
>
Powered by blists - more mailing lists