Skip to contentSkip to conversation

locking/csd-lock: make CSD lock debug tunables writable in /sys

PATCH In review Rik van Riel 2 participants 2 messages Dec 9, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 locking/csd-lock: make CSD lock debug tunables writable in /sys

Currently the CSD lock tunables can only be set at boot time in the kernel commandline, but the way these variables are used means there is really no reason not to tune them at runtime through /sys.

Make the CSD lock debug tunables tunable through /sys.

---
 kernel/smp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/smp.c +2 -2
index 27dc31a146a3..a33e575f97ab 100644
@@ -170,9 +170,9 @@ static DEFINE_PER_CPU(smp_call_func_t, cur_csd_func);
 static DEFINE_PER_CPU(void *, cur_csd_info);
 
 static ulong csd_lock_timeout = 5000;  /* CSD lock timeout in milliseconds. */
-module_param(csd_lock_timeout, ulong, 0444);
+module_param(csd_lock_timeout, ulong, 0644);
 static int panic_on_ipistall;  /* CSD panic timeout in milliseconds, 300000 for five minutes. */
-module_param(panic_on_ipistall, int, 0444);
+module_param(panic_on_ipistall, int, 0644);
 
 static atomic_t csd_bug_count = ATOMIC_INIT(0);
 
Signature · 1 line
2.47.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Rik van Riel

Currently the CSD lock tunables can only be set at boot time in the kernel commandline, but the way these variables are used means there is really no reason not to tune them at runtime through /sys.

Make the CSD lock debug tunables tunable through /sys.

Good point, and queued for v6.14 merge window.

Unless someone else would prefer to carry it, in which case:

Quoted 23 lines
---
 kernel/smp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/smp.c +2 -2
index 27dc31a146a3..a33e575f97ab 100644
@@ -170,9 +170,9 @@ static DEFINE_PER_CPU(smp_call_func_t, cur_csd_func);
 static DEFINE_PER_CPU(void *, cur_csd_info);
 
 static ulong csd_lock_timeout = 5000;  /* CSD lock timeout in milliseconds. */
-module_param(csd_lock_timeout, ulong, 0444);
+module_param(csd_lock_timeout, ulong, 0644);
 static int panic_on_ipistall;  /* CSD panic timeout in milliseconds, 300000 for five minutes. */
-module_param(panic_on_ipistall, int, 0444);
+module_param(panic_on_ipistall, int, 0644);
 
 static atomic_t csd_bug_count = ATOMIC_INIT(0);
 
Signature · 1 line
2.47.0