linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: akpm@linux-foundation.org, graf@amazon.com, pratyush@kernel.org,
	linux-kernel@vger.kernel.org, kexec@lists.infradead.org,
	linux-mm@kvack.org
Subject: Re: [PATCH] liveupdate: kho: Enable KHO by default
Date: Fri, 14 Nov 2025 09:30:11 +0200	[thread overview]
Message-ID: <aRbag7qR9OVNAQXN@kernel.org> (raw)
In-Reply-To: <20251110180715.602807-1-pasha.tatashin@soleen.com>

On Mon, Nov 10, 2025 at 01:07:15PM -0500, Pasha Tatashin wrote:
> Upcoming LUO requires KHO for its operations, the requirement to place
> both KHO=on and liveupdate=on becomes redundant. Set KHO to be enabled
> by default.

I though more about this and it seems too much of a change. kho=1 enables
scratch areas and that significantly changes how free pages are distributed
in the free lists.

Let's go with a Kconfig option we discussed of-list:
(this is on top of the current mmotm/mm-nonmm-unstable)

From 823299d80aa4f7c16ef6cfd798a19e1dfe1a91ab Mon Sep 17 00:00:00 2001
From: Pasha Tatashin <pasha.tatashin@soleen.com>
Date: Fri, 14 Nov 2025 09:27:47 +0200
Subject: [PATCH] kho: Allow KHO to be enabled by default

Upcoming LUO requires KHO for its operations, the requirement to place
both KHO=on and liveupdate=on becomes reduntant. Let's allow KHO to be
enabled by default, and CONFIG_LIVEUPDATE can select this CONFIG.

Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
---
 kernel/liveupdate/Kconfig          | 8 ++++++++
 kernel/liveupdate/kexec_handover.c | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/kernel/liveupdate/Kconfig b/kernel/liveupdate/Kconfig
index d7344d347f69..25c9a4d7781f 100644
--- a/kernel/liveupdate/Kconfig
+++ b/kernel/liveupdate/Kconfig
@@ -63,4 +63,12 @@ config KEXEC_HANDOVER_DEBUGFS
 	  Also, enables inspecting the KHO fdt trees with the debugfs binary
 	  blobs.
 
+config KEXEC_HANDOVER_ENABLE_DEFAULT
+	bool "Enable kexec handover by default"
+	depends on KEXEC_HANDOVER
+	help
+	  Enable the kexec handover by default. It is equivalent of passing
+	  kho=on via kernel parameter, and can be overwritten to off via
+	  kho=off.
+
 endmenu
diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_handover.c
index 568cd9fe9aca..23a3df297bb3 100644
--- a/kernel/liveupdate/kexec_handover.c
+++ b/kernel/liveupdate/kexec_handover.c
@@ -51,7 +51,7 @@ union kho_page_info {
 
 static_assert(sizeof(union kho_page_info) == sizeof(((struct page *)0)->private));
 
-static bool kho_enable __ro_after_init = true;
+static bool kho_enable __ro_after_init = IS_ENABLED(CONFIG_KEXEC_HANDOVER_ENABLE_DEFAULT);
 
 bool kho_is_enabled(void)
 {
-- 
2.50.1

 

-- 
Sincerely yours,
Mike.


  parent reply	other threads:[~2025-11-14  7:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-10 18:07 [PATCH] liveupdate: kho: Enable KHO by default Pasha Tatashin
2025-11-10 18:34 ` Mike Rapoport
2025-11-11 13:03   ` Pratyush Yadav
2025-11-14  7:30 ` Mike Rapoport [this message]
2025-11-14  9:01   ` Alexander Graf
2025-11-14 14:13   ` Pasha Tatashin
2025-11-15  9:42     ` 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=aRbag7qR9OVNAQXN@kernel.org \
    --to=rppt@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=graf@amazon.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 \
    /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;
as well as URLs for NNTP newsgroup(s).