All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pratyush Yadav <pratyush@kernel.org>
To: Chris Bainbridge <chris.bainbridge@canonical.com>
Cc: "Pratyush Yadav" <pratyush@kernel.org>,
	"Mike Rapoport" <rppt@kernel.org>,
	"Pasha Tatashin" <pasha.tatashin@soleen.com>,
	"Jason Miu" <jasonmiu@google.com>,
	"Alexander Graf" <graf@amazon.com>,
	"Ran Xiaokai" <ran.xiaokai@zte.com.cn>,
	regressions@lists.linux.dev, linux-kernel@vger.kernel.org,
	kexec@lists.infradead.org, linux-mm@kvack.org,
	"Michał Cłapiński" <mclapinski@google.com>
Subject: Re: [BUG] KHO handover hangs when memmap reserves PMEM
Date: Sun, 04 Oct 2026 19:53:32 +0200	[thread overview]
Message-ID: <2vxzzewtjqsj.fsf@kernel.org> (raw)
In-Reply-To: <asJc1GIBbCJ26akS@px13> (Chris Bainbridge's message of "Sun, 4 Oct 2026 16:09:00 +0100")

On Sun, Oct 04 2026, Chris Bainbridge wrote:

> On Sun, Oct 04, 2026 at 03:39:25PM +0200, Pratyush Yadav wrote:
>> 
>> Just to confirm, the first kernel boots without memmap= right?
>
> Yes.
>
>> I think the main problem is that the radix tree pages can be anywhere in
>> memory. So on the first kernel, they can land in an area that the second
>> kernel's memmap= reserves. So kho_memory_init() might end up using
>> memory that memmap= reserved. I'm not sure why exactly the next kernel
>> doesn't produce any output, but IIRC memmap= memory is not mapped to the
>> direct map, so accessing those pages likely causes a page fault.
>
> That's correct, kho_memory_init() page faults. It happens before the
> serial console is available, so there is no output.

Yeah, then I think you need an extra kexec with KHO off to enable
memmap=. Or I guess hot-unplug the memory you'd like to memmap= early on
first boot, which should make sure no radix tree pages land there.

Apart from that, I don't have any good ideas to properly solve this
problem.

-- 
Regards,
Pratyush Yadav


  reply	other threads:[~2026-10-04 17:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-03 17:02 [BUG] KHO handover hangs when memmap reserves PMEM Chris Bainbridge
2026-10-04 13:39 ` Pratyush Yadav
2026-10-04 15:09   ` Chris Bainbridge
2026-10-04 17:53     ` Pratyush Yadav [this message]
2026-10-06 10:55 ` Mike Rapoport
2026-10-06 18:02   ` Chris Bainbridge
2026-10-07  6:11     ` Mike Rapoport

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2vxzzewtjqsj.fsf@kernel.org \
    --to=pratyush@kernel.org \
    --cc=chris.bainbridge@canonical.com \
    --cc=graf@amazon.com \
    --cc=jasonmiu@google.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mclapinski@google.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=ran.xiaokai@zte.com.cn \
    --cc=regressions@lists.linux.dev \
    --cc=rppt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.