* [PATCH] nohz: replace dead select with choice default
@ 2026-08-01 16:01 Julian Braha
2026-08-01 21:26 ` Bradley Morgan
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Julian Braha @ 2026-08-01 16:01 UTC (permalink / raw)
To: akpm
Cc: arnd, ojeda, n.schier, tglx, gary, thomas.weissschuh, aliceryhl,
leitao, dianders, linux.amoon, oleg, peterz, andreas,
linux-kernel, Julian Braha
'select' does not work on config options in a 'choice', so currently the
'select VIRT_CPU_ACCOUNTING_GEN' for NO_HZ_FULL is dead, with the choice
option VIRT_CPU_ACCOUNTING_GEN only being enabled when NO_HZ_FULL=y because
the other choice members depend on NO_HZ_FULL=n.
Let's remove the dead select, and encode this relationship as a default of
the choice, instead.
This dead select was found by kconfirm, a static analysis tool for Kconfig.
Signed-off-by: Julian Braha <julianbraha@gmail.com>
---
init/Kconfig | 1 +
kernel/time/Kconfig | 1 -
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/init/Kconfig b/init/Kconfig
index 544167a7045d..8583d9f06c52 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -565,6 +565,7 @@ config VIRT_CPU_ACCOUNTING
choice
prompt "Cputime accounting"
+ default VIRT_CPU_ACCOUNTING_GEN if NO_HZ_FULL
default TICK_CPU_ACCOUNTING
# Kind of a stub config for the pure tick based cputime accounting
diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig
index d098ac39bde4..ddfb6bee0745 100644
--- a/kernel/time/Kconfig
+++ b/kernel/time/Kconfig
@@ -133,7 +133,6 @@ config NO_HZ_FULL
depends on HAVE_VIRT_CPU_ACCOUNTING_GEN
select NO_HZ_COMMON
select RCU_NOCB_CPU
- select VIRT_CPU_ACCOUNTING_GEN
select IRQ_WORK
select CPU_ISOLATION
help
--
2.55.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] nohz: replace dead select with choice default
2026-08-01 16:01 [PATCH] nohz: replace dead select with choice default Julian Braha
@ 2026-08-01 21:26 ` Bradley Morgan
2026-08-02 19:40 ` Nicolas Schier
2026-08-11 13:42 ` [tip: timers/core] nohz: Replace " tip-bot2 for Julian Braha
2 siblings, 0 replies; 4+ messages in thread
From: Bradley Morgan @ 2026-08-01 21:26 UTC (permalink / raw)
To: julianbraha
Cc: akpm, aliceryhl, andreas, arnd, dianders, gary, leitao,
linux-kernel, linux.amoon, n.schier, ojeda, oleg, peterz, tglx,
thomas.weissschuh
Thanks for the patch Julian.
Please add:
Reviewed-by: Bradley Morgan <include@grrlz.net>
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] nohz: replace dead select with choice default
2026-08-01 16:01 [PATCH] nohz: replace dead select with choice default Julian Braha
2026-08-01 21:26 ` Bradley Morgan
@ 2026-08-02 19:40 ` Nicolas Schier
2026-08-11 13:42 ` [tip: timers/core] nohz: Replace " tip-bot2 for Julian Braha
2 siblings, 0 replies; 4+ messages in thread
From: Nicolas Schier @ 2026-08-02 19:40 UTC (permalink / raw)
To: Julian Braha
Cc: akpm, arnd, ojeda, tglx, gary, thomas.weissschuh, aliceryhl,
leitao, dianders, linux.amoon, oleg, peterz, andreas,
linux-kernel
On Sat, Aug 01, 2026 at 05:01:40PM +0100, Julian Braha wrote:
> 'select' does not work on config options in a 'choice', so currently the
> 'select VIRT_CPU_ACCOUNTING_GEN' for NO_HZ_FULL is dead, with the choice
> option VIRT_CPU_ACCOUNTING_GEN only being enabled when NO_HZ_FULL=y because
> the other choice members depend on NO_HZ_FULL=n.
>
> Let's remove the dead select, and encode this relationship as a default of
> the choice, instead.
>
> This dead select was found by kconfirm, a static analysis tool for Kconfig.
>
> Signed-off-by: Julian Braha <julianbraha@gmail.com>
> ---
> init/Kconfig | 1 +
> kernel/time/Kconfig | 1 -
> 2 files changed, 1 insertion(+), 1 deletion(-)
>
Thanks!
Reviewed-by: Nicolas Schier <nsc@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip: timers/core] nohz: Replace dead select with choice default
2026-08-01 16:01 [PATCH] nohz: replace dead select with choice default Julian Braha
2026-08-01 21:26 ` Bradley Morgan
2026-08-02 19:40 ` Nicolas Schier
@ 2026-08-11 13:42 ` tip-bot2 for Julian Braha
2 siblings, 0 replies; 4+ messages in thread
From: tip-bot2 for Julian Braha @ 2026-08-11 13:42 UTC (permalink / raw)
To: linux-tip-commits
Cc: Julian Braha, Thomas Gleixner, Bradley Morgan, Nicolas Schier,
x86, linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: b17006b45283f012a6e166517f5ca3e1af2f806a
Gitweb: https://git.kernel.org/tip/b17006b45283f012a6e166517f5ca3e1af2f806a
Author: Julian Braha <julianbraha@gmail.com>
AuthorDate: Sat, 01 Aug 2026 17:01:40 +01:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Tue, 11 Aug 2026 15:37:23 +02:00
nohz: Replace dead select with choice default
'select' does not work on config options in a 'choice', so currently the
'select VIRT_CPU_ACCOUNTING_GEN' for NO_HZ_FULL is dead, with the choice
option VIRT_CPU_ACCOUNTING_GEN only being enabled when NO_HZ_FULL=y because
the other choice members depend on NO_HZ_FULL=n.
Remove the dead select, and encode this relationship as a default of the
choice, instead.
This dead select was found by kconfirm, a static analysis tool for Kconfig.
Signed-off-by: Julian Braha <julianbraha@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Bradley Morgan <include@grrlz.net>
Reviewed-by: Nicolas Schier <nsc@kernel.org>
Link: https://patch.msgid.link/20260801160140.2391000-1-julianbraha@gmail.com
---
init/Kconfig | 1 +
kernel/time/Kconfig | 1 -
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/init/Kconfig b/init/Kconfig
index 5230d48..523e41d 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -562,6 +562,7 @@ config VIRT_CPU_ACCOUNTING
choice
prompt "Cputime accounting"
+ default VIRT_CPU_ACCOUNTING_GEN if NO_HZ_FULL
default TICK_CPU_ACCOUNTING
# Kind of a stub config for the pure tick based cputime accounting
diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig
index d098ac3..ddfb6be 100644
--- a/kernel/time/Kconfig
+++ b/kernel/time/Kconfig
@@ -133,7 +133,6 @@ config NO_HZ_FULL
depends on HAVE_VIRT_CPU_ACCOUNTING_GEN
select NO_HZ_COMMON
select RCU_NOCB_CPU
- select VIRT_CPU_ACCOUNTING_GEN
select IRQ_WORK
select CPU_ISOLATION
help
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-08-11 13:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-01 16:01 [PATCH] nohz: replace dead select with choice default Julian Braha
2026-08-01 21:26 ` Bradley Morgan
2026-08-02 19:40 ` Nicolas Schier
2026-08-11 13:42 ` [tip: timers/core] nohz: Replace " tip-bot2 for Julian Braha
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.