mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Down <chris@chrisdown.name>
To: Pratyush Yadav <pratyush@kernel.org>
Cc: rppt@kernel.org, pasha.tatashin@soleen.com, graf@amazon.com,
	kexec@lists.infradead.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH v2 1/2] kho: skip bootmem setup in kho_init() if bootmem was inherited
Date: Wed, 02 Dec 2026 18:58:20 -0800	[thread overview]
Message-ID: <axDazJEkW2g41SU7@chrisdown.name> (raw)
In-Reply-To: <2vxzmrqouex7.fsf@kernel.org>

Hi Pratyush,

Pratyush Yadav writes:
>Nit: I don't understand what "even if handover is dropped later" means.
>Doesn't the handover get dropped _before_ kho_init()?
>
>Also, perhaps "even if the handover fails" is better?

Yeah, it does, so "later" is wrong there. I'll change it to "even if the
handover failed" in v3.

>kho_memory_init_early() clears kho_in.bootmem_phys on failure. So this
>doesn't work. It clears it because kho_memory_init() uses to check if it
>should even try to retrieve preserved memory.
>
>Perhaps it should only clear fdt_phys and kho_memory_init() should check
>fdt_phys instead?

Good catch, thanks. I'll do that in v3. kho_memory_init() will also have
to skip kho_reserve_bootmem() in that case, otherwise it reserves new
areas that kho_init() then never releases.

While looking at that I noticed that kho_account_incoming_bootmem() and
kho_init()'s error path still check is_kho_boot() as well, so v3 will
switch those over too.

Thanks!

Chris

  reply	other threads:[~2026-12-03  2:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02  6:32 [PATCH v2 0/2] kho: handle failures to reserve preserved memory Chris Down
2026-12-02  6:32 ` [PATCH v2 1/2] kho: skip bootmem setup in kho_init() if bootmem was inherited Chris Down
2026-12-02 10:59   ` Pratyush Yadav
2026-12-03  2:58     ` Chris Down [this message]
2026-12-02  6:32 ` [PATCH v2 2/2] kho: drop the handover if preserved memory can't be reserved Chris Down
2026-12-02 11:14   ` Pratyush Yadav
2026-12-03  2:58     ` Chris Down
2026-12-03 11:57   ` Mike Rapoport
2026-12-02 11:24 ` [PATCH v2 0/2] kho: handle failures to reserve preserved memory Mike Rapoport
2026-12-03  2:58   ` Chris Down
2026-12-03 11:58     ` 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=axDazJEkW2g41SU7@chrisdown.name \
    --to=chris@chrisdown.name \
    --cc=graf@amazon.com \
    --cc=kernel-team@meta.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pasha.tatashin@soleen.com \
    --cc=pratyush@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®