From 1d00b2f4a5324d53c50847abc4ee7eedf9eee0c4 Mon Sep 17 00:00:00 2001 From: Andrew Lukoshko Date: Mon, 30 Sep 2024 12:31:28 +0000 Subject: [PATCH] Revert "printk: allow disabling printk per-console device kthreads at boot" This reverts commit d822c9eb58f656856c6d119002195a11ec482eed. --- ...abling-printk-per-console-device-kth.patch | 77 ------------------- SPECS/kernel.spec | 3 - 2 files changed, 80 deletions(-) delete mode 100644 SOURCES/0001-printk-allow-disabling-printk-per-console-device-kth.patch diff --git a/SOURCES/0001-printk-allow-disabling-printk-per-console-device-kth.patch b/SOURCES/0001-printk-allow-disabling-printk-per-console-device-kth.patch deleted file mode 100644 index 56f6e116c..000000000 --- a/SOURCES/0001-printk-allow-disabling-printk-per-console-device-kth.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 2767891ad81d4a0077f8f2123b7ce3b03b55289e Mon Sep 17 00:00:00 2001 -From: "Luis Claudio R. Goncalves" -Date: Wed, 13 Mar 2024 10:07:11 -0300 -Subject: [PATCH] printk: allow disabling printk per-console device kthreads at - boot - -JIRA: https://issues.redhat.com/browse/RHEL-17709 -Upstream Status: RHEL only - -Create the 'printk_no_perconsole_kthreads' boot parameter, allowing one to disable the -per-console device printk kthreads, which are enabled by default. - -Signed-off-by: Luis Claudio R. Goncalves ---- - .../admin-guide/kernel-parameters.txt | 4 +++ - kernel/printk/printk.c | 26 +++++++++++++++++++ - 2 files changed, 30 insertions(+) - -diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt -index fca105370555..8a6d9d23bb65 100644 ---- a/Documentation/admin-guide/kernel-parameters.txt -+++ b/Documentation/admin-guide/kernel-parameters.txt -@@ -4526,6 +4526,10 @@ - printk.time= Show timing data prefixed to each printk message line - Format: (1/Y/y=enable, 0/N/n=disable) - -+ printk_no_perconsole_kthreads -+ [KNL] Disable the printk per-console device kthreads. -+ This option is not available for RT kernels. -+ - processor.max_cstate= [HW,ACPI] - Limit processor to maximum C-state - max_cstate=9 overrides any DMI blacklist limit. -diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c -index f1f9ce9b23f6..aeb9b85dcb06 100644 ---- a/kernel/printk/printk.c -+++ b/kernel/printk/printk.c -@@ -3853,10 +3853,36 @@ static int __init printk_late_init(void) - } - late_initcall(printk_late_init); - -+/* -+ * This boot parameter allows one to disable the per-console device printk -+ * kernel threads, which are enabled by default. -+ */ -+static bool __read_mostly printk_no_perconsole_kthreads = false; -+ -+static int __init disable_printk_pdkth_setup(char *str) -+{ -+ if (!IS_ENABLED(CONFIG_PREEMPT_RT)) { -+ printk_no_perconsole_kthreads = true; -+ pr_info("Disabling printk per-console device kthreads.\n"); -+ } else { -+ pr_info("Can't disable printk per-console device kthreads on RT.\n"); -+ } -+ -+ return 0; -+} -+ -+early_param("printk_no_perconsole_kthreads", disable_printk_pdkth_setup); -+module_param(printk_no_perconsole_kthreads, bool, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(printk_no_perconsole_kthreads, -+ "Disable printk per-console device kthreads."); -+ - static int __init printk_activate_kthreads(void) - { - struct console *con; - -+ if (unlikely(printk_no_perconsole_kthreads)) -+ return 0; -+ - console_lock(); - printk_kthreads_available = true; - for_each_console(con) --- -2.27.0 - diff --git a/SPECS/kernel.spec b/SPECS/kernel.spec index a216a0c9c..726876146 100755 --- a/SPECS/kernel.spec +++ b/SPECS/kernel.spec @@ -960,7 +960,6 @@ Patch1: patch-%{patchversion}-redhat.patch # AlmaLinux patches Patch1001: 0001-nvme-pci-add-BOGUS_NID-for-Intel-0a54-device.patch -Patch1002: 0001-printk-allow-disabling-printk-per-console-device-kth.patch # Bring back deprecated PCI ids #CFHack #CFHack2024 Patch2001: 0001-Enable-all-disabled-pci-devices-by-moving-to-unmaint.patch @@ -1716,7 +1715,6 @@ ApplyOptionalPatch patch-%{patchversion}-redhat.patch %endif ApplyPatch 0001-nvme-pci-add-BOGUS_NID-for-Intel-0a54-device.patch -ApplyPatch 0001-printk-allow-disabling-printk-per-console-device-kth.patch ApplyOptionalPatch linux-kernel-test.patch @@ -3782,7 +3780,6 @@ fi - be2iscsi: bring back deprecated PCI ids - nvme-pci: add BOGUS_NID for Intel 0a54 device - kernel/rh_messages.h: empty rh_disabled_pci_devices and rh_unmaintained_pci_devices lists -- printk: allow disabling printk per-console device kthreads at boot * Thu Feb 22 2024 Scott Weaver [5.14.0-427.el9] - scsi: smartpqi: Fix disable_managed_interrupts (Tomas Henzl) [RHEL-26145]