[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250807064849.3988-1-sehee1.jeong@samsung.com>
Date: Thu, 7 Aug 2025 15:48:49 +0900
From: Sehee Jeong <sehee1.jeong@...sung.com>
To: anna-maria@...utronix.de, frederic@...nel.org, tglx@...utronix.de,
corbet@....net
Cc: linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
sehee1.jeong@...sung.com
Subject: timers/migration: add 'notmigr' kernel parameter to disable timer
migration
On heterogeneous systems with big.LITTLE architectures, timer migration
may cause timers from little cores to run on big cores, or vice versa,
because core type differences are not taken into account in the current
timer migration logic. This can be undesirable in systems that require
strict power management, predictable latency, or core isolation.
This patch does not attempt to solve the structural limitation,
but provides a workaround by introducing an optional early boot parameter:
notmigr
When specified, timer migration initialization is skipped entirely.
Signed-off-by: Sehee Jeong <sehee1.jeong@...sung.com>
---
Documentation/admin-guide/kernel-parameters.txt | 2 ++
kernel/time/timer_migration.c | 14 ++++++++++++++
2 files changed, 16 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 85c27c97b826..4bb10ac574e5 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -4132,6 +4132,8 @@
no_timer_check [X86,APIC] Disables the code which tests for
broken timer IRQ sources.
+ notmigr [KNL,EARLY] Disable timer migration.
+
no_uaccess_flush
[PPC,EARLY] Don't flush the L1-D cache after accessing user data.
diff --git a/kernel/time/timer_migration.c b/kernel/time/timer_migration.c
index 72538baa7a1f..7636a1b3ae6b 100644
--- a/kernel/time/timer_migration.c
+++ b/kernel/time/timer_migration.c
@@ -422,6 +422,8 @@ static unsigned int tmigr_crossnode_level __read_mostly;
static DEFINE_PER_CPU(struct tmigr_cpu, tmigr_cpu);
+static bool tmigr_enabled = true;
+
#define TMIGR_NONE 0xFF
#define BIT_CNT 8
@@ -1790,6 +1792,9 @@ static int __init tmigr_init(void)
BUILD_BUG_ON_NOT_POWER_OF_2(TMIGR_CHILDREN_PER_GROUP);
+ if (!tmigr_enabled)
+ return 0;
+
/* Nothing to do if running on UP */
if (ncpus == 1)
return 0;
@@ -1854,3 +1859,12 @@ static int __init tmigr_init(void)
return ret;
}
early_initcall(tmigr_init);
+
+static int __init notmigr(char *str)
+{
+ tmigr_enabled = false;
+
+ return 0;
+}
+
+early_param("notmigr", notmigr);
--
2.49.0
Powered by blists - more mailing lists