[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <mafs0cy6pljci.fsf@kernel.org>
Date: Tue, 14 Oct 2025 15:10:37 +0200
From: Pratyush Yadav <pratyush@...nel.org>
To: Breno Leitao <leitao@...ian.org>
Cc: Pratyush Yadav <pratyush@...nel.org>, Changyuan Lyu
<changyuanl@...gle.com>, rppt@...nel.org, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org, anthony.yznaga@...cle.com, arnd@...db.de,
ashish.kalra@....com, benh@...nel.crashing.org, bp@...en8.de,
catalin.marinas@....com, corbet@....net, dave.hansen@...ux.intel.com,
devicetree@...r.kernel.org, dwmw2@...radead.org, ebiederm@...ssion.com,
graf@...zon.com, hpa@...or.com, jgowans@...zon.com,
kexec@...ts.infradead.org, krzk@...nel.org,
linux-arm-kernel@...ts.infradead.org, linux-doc@...r.kernel.org,
linux-mm@...ck.org, luto@...nel.org, mark.rutland@....com,
mingo@...hat.com, pasha.tatashin@...een.com, pbonzini@...hat.com,
peterz@...radead.org, robh@...nel.org, rostedt@...dmis.org,
saravanak@...gle.com, skinsburskii@...ux.microsoft.com,
tglx@...utronix.de, thomas.lendacky@....com, will@...nel.org,
x86@...nel.org
Subject: Re: [PATCH v8 01/17] memblock: add MEMBLOCK_RSRV_KERN flag
On Tue, Oct 14 2025, Breno Leitao wrote:
> Hello Pratyush,
>
> On Mon, Oct 13, 2025 at 06:40:09PM +0200, Pratyush Yadav wrote:
>> On Mon, Oct 13 2025, Pratyush Yadav wrote:
>> >
>> > I suppose this would be useful. I think enabling memblock debug prints
>> > would also be helpful (using the "memblock=debug" commandline parameter)
>> > if it doesn't impact your production environment too much.
>>
>> Actually, I think "memblock=debug" is going to be the more useful thing
>> since it would also show what function allocated the overlapping range
>> and the flags it was allocated with.
>>
>> On my qemu VM with KVM, this results in around 70 prints from memblock.
>> So it adds a bit of extra prints but nothing that should be too
>> disrupting I think. Plus, only at boot so the worst thing you get is
>> slightly slower boot times.
>
> Unfortunately this issue is happening on production systems, and I don't
> have an easy way to reproduce it _yet_.
>
> At the same time, "memblock=debug" has two problems:
>
> 1) It slows the boot time as you suggested. Boot time at large
> environments is SUPER critical and time sensitive. It is a bit
> weird, but it is common for machines in production to kexec
> _thousands_ of times, and kexecing is considered downtime.
I don't know if it would make a real enough difference on boot times,
only that it should theoretically affect it, mainly if you are using
serial for dmesg logs. Anyway, that's your production environment so you
know best.
>
> This would be useful if I find some hosts getting this issue, and
> then I can easily enable the extra information to collect what
> I need, but, this didn't pan out because the hosts I got
> `memblock=debug` didn't collaborate.
>
> 2) "memblock=debug" is verbose for all cases, which also not necessary
> the desired behaviour. I am more interested in only being verbose
> when there is a known problem.
>
> That said, my suggestion is to only dump extra information when something goes
> wrong, not affecting the boot time neither boot verbosity.
>
With your proposed change, we only know what the overlapping area is,
but not who allocated it. I don't see how that can be done when the
error is detected. memblock debug lets us know that, which is why I
suggested it.
--
Regards,
Pratyush Yadav
Powered by blists - more mailing lists