linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Pratyush Yadav <pratyush@kernel.org>
To: Breno Leitao <leitao@debian.org>
Cc: Pratyush Yadav <pratyush@kernel.org>,
	 Alexander Graf <graf@amazon.com>,
	Mike Rapoport <rppt@kernel.org>,
	 Pasha Tatashin <pasha.tatashin@soleen.com>,
	 linux-kernel@vger.kernel.org, kexec@lists.infradead.org,
	 linux-mm@kvack.org,  usamaarif642@gmail.com, rmikey@meta.com,
	 clm@fb.com,  riel@surriel.com,  kernel-team@meta.com
Subject: Re: [PATCH v2 2/2] kexec: history: track kexec boot counter
Date: Wed, 14 Jan 2026 19:05:08 +0000	[thread overview]
Message-ID: <2vxza4yghv6j.fsf@kernel.org> (raw)
In-Reply-To: <w542cckfixvgo6pvepdg6itaera6qlq75pemqvpah7us6c7yxa@6vm7ebxd6ala> (Breno Leitao's message of "Tue, 6 Jan 2026 03:04:28 -0800")

On Tue, Jan 06 2026, Breno Leitao wrote:

> On Fri, Jan 02, 2026 at 09:23:18PM +0100, Pratyush Yadav wrote:
>> On Fri, Jan 02 2026, Breno Leitao wrote:
>> 
>> > Track and display the number of kexec boots since the last cold reboot
>> 
>> Nit: this does not track kexec boots, it tracks KHO boots. None of this
>> can work on normal kexec boots. Can you please update the wording to
>> make that clear?
>> 
>> > when CONFIG_KEXEC_HISTORY is enabled.
>> >
>> > This extends the previous kernel release tracking feature by adding
>> > a counter that increments with each kexec boot. The counter provides
>> > visibility into the kexec chain depth, which is useful for understanding
>> > boot history in production environments.
>> >
>> > Add a new property, "kexec-count" in KHO FDT alongside the existing
>> > "previous-release" property. The counter is:
>> >
>> >  - Initialized to 0 when kho_in is instantiated.
>> >  - Incremented by 1 on each subsequent kexec.
>> >  - Printed alongside the previous kernel release version.
>> >
>> > The counter is stored as a 32-bit unsigned integer in FDT format and is
>> > only active when CONFIG_KEXEC_HISTORY is enabled.
>> 
>> We have such a counter for LUO as well from the properly
>> "liveupdate-number". If you're using LUO, why can't you use that counter
>> directly?
>> 
>> If you're not using LUO, I'm curious, what's your use case? Right now
>> KHO only supports reserve-mem outside of LUO. Is that what you plan to
>> use?
>> 
>> Also, do we want to keep both counters independently? Or do we have one
>> and drop the other? Pasha, what do you think?
>
> In fact, I do not have plan to use LUO right now. My goal is to pass the
> kexec release from kernel to another, and for that I am using KHO to
> pass this information.

Oh, cool. Nice to see other use cases for KHO.

>
> That said, I am planning to use KHO as the infrastructure to pass the
> kernel version from one kernel to another.
>
> Given that I don't think this "feature" should depend on LUO, maybe the
> counters should be independent (?!)

If you aren't using LUO then you certainly can't use its counter. But
LUo users are all KHO users. So perhaps we can get away with removing
the LUO one and moving it to KHO?

-- 
Regards,
Pratyush Yadav


      reply	other threads:[~2026-01-14 19:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-02 14:53 [PATCH v2 0/2] kexec: history: track previous kernel version and kexec boot count Breno Leitao
2026-01-02 14:53 ` [PATCH v2 1/2] kexec: history: track previous kernel version Breno Leitao
2026-01-02 15:02   ` Usama Arif
2026-01-02 15:14     ` Breno Leitao
2026-01-02 15:33       ` Usama Arif
2026-01-02 16:18   ` Pasha Tatashin
2026-01-02 20:17   ` Pratyush Yadav
2026-01-05 10:47     ` Breno Leitao
2026-01-14 19:08       ` Pratyush Yadav
2026-01-02 14:53 ` [PATCH v2 2/2] kexec: history: track kexec boot counter Breno Leitao
2026-01-02 15:09   ` Usama Arif
2026-01-02 15:24     ` Breno Leitao
2026-01-02 15:31       ` Usama Arif
2026-01-02 16:20   ` Pasha Tatashin
2026-01-02 20:23   ` Pratyush Yadav
2026-01-06 11:04     ` Breno Leitao
2026-01-14 19:05       ` Pratyush Yadav [this message]

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=2vxza4yghv6j.fsf@kernel.org \
    --to=pratyush@kernel.org \
    --cc=clm@fb.com \
    --cc=graf@amazon.com \
    --cc=kernel-team@meta.com \
    --cc=kexec@lists.infradead.org \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pasha.tatashin@soleen.com \
    --cc=riel@surriel.com \
    --cc=rmikey@meta.com \
    --cc=rppt@kernel.org \
    --cc=usamaarif642@gmail.com \
    /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