lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aLb_SJ2MYefD4JuN@localhost.localdomain>
Date: Tue, 2 Sep 2025 16:29:28 +0200
From: Frederic Weisbecker <frederic@...nel.org>
To: Sehee Jeong <sehee1.jeong@...sung.com>
Cc: anna-maria@...utronix.de, tglx@...utronix.de, corbet@....net,
	linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org
Subject: Re: timers/migration: add 'notmigr' kernel parameter to disable
 timer migration

Le Thu, Aug 07, 2025 at 03:48:49PM +0900, Sehee Jeong a écrit :
> 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.

It's a shame we couldn't solve your problem yet but at least such an
option can be nice for general testing beyond big.LITTLE situations.

> 
> 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);

This immediately reads like "not migr", which doesn't ring a bell.
no_tmigr would be better. I would even prefer tmigr=off (with default on)
so that the arguments can be further extended in the future if needed.

Thanks

> -- 
> 2.49.0
> 

-- 
Frederic Weisbecker
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ