Skip to contentSkip to conversation

Remove orphaned CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT

PATCH In review Marc Aurèle La France 4 participants 6 messages Feb 21, 2023 – Mar 27, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove orphaned CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT

After 93d102f094be9beab28e5afb656c188b16a3793b "printk: remove safe buffers", CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT is no longer useful. Remove it.

This change is not eligible for stable@.

Please Reply-To-All.

Marc.

arch/powerpc/configs/microwatt_defconfig +0 -1
diff -aNpRruz -X /etc/diff.excludes linux-6.2.0/arch/powerpc/configs/microwatt_defconfig devel-6.2.0/arch/powerpc/configs/microwatt_defconfig
@@ -4,7 +4,6 @@ CONFIG_HIGH_RES_TIMERS=y
 CONFIG_PREEMPT_VOLUNTARY=y
 CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_LOG_BUF_SHIFT=16
-CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=12
 CONFIG_CGROUPS=y
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
arch/riscv/configs/nommu_k210_defconfig +0 -1
diff -aNpRruz -X /etc/diff.excludes linux-6.2.0/arch/riscv/configs/nommu_k210_defconfig devel-6.2.0/arch/riscv/configs/nommu_k210_defconfig
@@ -1,6 +1,5 @@
 # CONFIG_CPU_ISOLATION is not set
 CONFIG_LOG_BUF_SHIFT=13
-CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=12
 CONFIG_BLK_DEV_INITRD=y
 # CONFIG_RD_GZIP is not set
 # CONFIG_RD_BZIP2 is not set
arch/riscv/configs/nommu_k210_sdcard_defconfig +0 -1
diff -aNpRruz -X /etc/diff.excludes linux-6.2.0/arch/riscv/configs/nommu_k210_sdcard_defconfig devel-6.2.0/arch/riscv/configs/nommu_k210_sdcard_defconfig
@@ -1,6 +1,5 @@
 # CONFIG_CPU_ISOLATION is not set
 CONFIG_LOG_BUF_SHIFT=13
-CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=12
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 # CONFIG_SYSFS_SYSCALL is not set
 # CONFIG_FHANDLE is not set
arch/riscv/configs/nommu_virt_defconfig +0 -1
diff -aNpRruz -X /etc/diff.excludes linux-6.2.0/arch/riscv/configs/nommu_virt_defconfig devel-6.2.0/arch/riscv/configs/nommu_virt_defconfig
@@ -1,6 +1,5 @@
 # CONFIG_CPU_ISOLATION is not set
 CONFIG_LOG_BUF_SHIFT=16
-CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=12
 CONFIG_BLK_DEV_INITRD=y
 # CONFIG_RD_BZIP2 is not set
 # CONFIG_RD_LZMA is not set
init/Kconfig +0 -24
diff -aNpRruz -X /etc/diff.excludes linux-6.2.0/init/Kconfig devel-6.2.0/init/Kconfig
@@ -769,30 +769,6 @@ config LOG_CPU_MAX_BUF_SHIFT
 		     13 =>   8 KB for each CPU
 		     12 =>   4 KB for each CPU
 
-config PRINTK_SAFE_LOG_BUF_SHIFT
-	int "Temporary per-CPU printk log buffer size (12 => 4KB, 13 => 8KB)"
-	range 10 21
-	default 13
-	depends on PRINTK
-	help
-	  Select the size of an alternate printk per-CPU buffer where messages
-	  printed from unsafe contexts are temporary stored. One example would
-	  be NMI messages, another one - printk recursion. The messages are
-	  copied to the main log buffer in a safe context to avoid a deadlock.
-	  The value defines the size as a power of 2.
-
-	  Those messages are rare and limited. The largest one is when
-	  a backtrace is printed. It usually fits into 4KB. Select
-	  8KB if you want to be on the safe side.
-
-	  Examples:
-		     17 => 128 KB for each CPU
-		     16 =>  64 KB for each CPU
-		     15 =>  32 KB for each CPU
-		     14 =>  16 KB for each CPU
-		     13 =>   8 KB for each CPU
-		     12 =>   4 KB for each CPU
-
 config PRINTK_INDEX
 	bool "Printk indexing debugfs interface"
 	depends on PRINTK && DEBUG_FS
Reviewed-by on v1 1/1
#1 lore raw

(Added the rest of the printk team CC.)

Quoted 10 lines · Marc Aurèle La France

After 93d102f094be9beab28e5afb656c188b16a3793b "printk: remove safe buffers", CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT is no longer useful. Remove it.

This change is not eligible for stable@.

Please Reply-To-All.

Marc.

Quoted 65 lines

diff -aNpRruz -X /etc/diff.excludes linux-6.2.0/arch/powerpc/configs/microwatt_defconfig devel-6.2.0/arch/powerpc/configs/microwatt_defconfig

arch/powerpc/configs/microwatt_defconfig +0 -1
@@ -4,7 +4,6 @@ CONFIG_HIGH_RES_TIMERS=y
 CONFIG_PREEMPT_VOLUNTARY=y
 CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_LOG_BUF_SHIFT=16
-CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=12
 CONFIG_CGROUPS=y
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y

diff -aNpRruz -X /etc/diff.excludes linux-6.2.0/arch/riscv/configs/nommu_k210_defconfig devel-6.2.0/arch/riscv/configs/nommu_k210_defconfig

arch/riscv/configs/nommu_k210_defconfig +0 -1
@@ -1,6 +1,5 @@
 # CONFIG_CPU_ISOLATION is not set
 CONFIG_LOG_BUF_SHIFT=13
-CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=12
 CONFIG_BLK_DEV_INITRD=y
 # CONFIG_RD_GZIP is not set
 # CONFIG_RD_BZIP2 is not set

diff -aNpRruz -X /etc/diff.excludes linux-6.2.0/arch/riscv/configs/nommu_k210_sdcard_defconfig devel-6.2.0/arch/riscv/configs/nommu_k210_sdcard_defconfig

arch/riscv/configs/nommu_k210_sdcard_defconfig +0 -1
@@ -1,6 +1,5 @@
 # CONFIG_CPU_ISOLATION is not set
 CONFIG_LOG_BUF_SHIFT=13
-CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=12
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 # CONFIG_SYSFS_SYSCALL is not set
 # CONFIG_FHANDLE is not set

diff -aNpRruz -X /etc/diff.excludes linux-6.2.0/arch/riscv/configs/nommu_virt_defconfig devel-6.2.0/arch/riscv/configs/nommu_virt_defconfig

arch/riscv/configs/nommu_virt_defconfig +0 -1
@@ -1,6 +1,5 @@
 # CONFIG_CPU_ISOLATION is not set
 CONFIG_LOG_BUF_SHIFT=16
-CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=12
 CONFIG_BLK_DEV_INITRD=y
 # CONFIG_RD_BZIP2 is not set
 # CONFIG_RD_LZMA is not set

diff -aNpRruz -X /etc/diff.excludes linux-6.2.0/init/Kconfig devel-6.2.0/init/Kconfig

init/Kconfig +0 -17
@@ -769,30 +769,6 @@ config LOG_CPU_MAX_BUF_SHIFT
 		     13 =>   8 KB for each CPU
 		     12 =>   4 KB for each CPU
 
-config PRINTK_SAFE_LOG_BUF_SHIFT
-	int "Temporary per-CPU printk log buffer size (12 => 4KB, 13 => 8KB)"
-	range 10 21
-	default 13
-	depends on PRINTK
-	help
-	  Select the size of an alternate printk per-CPU buffer where messages
-	  printed from unsafe contexts are temporary stored. One example would
-	  be NMI messages, another one - printk recursion. The messages are
-	  copied to the main log buffer in a safe context to avoid a deadlock.
-	  The value defines the size as a power of 2.
-
-	  Those messages are rare and limited. The largest one is when
-	  a backtrace is printed. It usually fits into 4KB. Select
-	  8KB if you want to be on the safe side.
-
-	  Examples:

init/Kconfig config LOG_CPU_MAX_BUF_SHIFT · line 774

Quoted 10 lines
init/Kconfig +0 -7
-		     17 => 128 KB for each CPU
-		     16 =>  64 KB for each CPU
-		     15 =>  32 KB for each CPU
-		     14 =>  16 KB for each CPU
-		     13 =>   8 KB for each CPU
-		     12 =>   4 KB for each CPU
-
 config PRINTK_INDEX
 	bool "Printk indexing debugfs interface"
 	depends on PRINTK && DEBUG_FS

Thanks!

John Ogness

Reviewed-by
#2 lore raw
Quoted 8 lines · John Ogness

(Added the rest of the printk team CC.)

Quoted 5 lines · Marc Aurèle La France

After 93d102f094be9beab28e5afb656c188b16a3793b "printk: remove safe buffers", CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT is no longer useful. Remove it.

This change is not eligible for stable@.

Quoted 7 lines
Quoted 5 lines

Please Reply-To-All.

Marc.

Reviewed-by on v1 1/1
#3 lore raw
In reply to Marc Aurèle La France
Quoted 6 lines · Marc Aurèle La France

After 93d102f094be9beab28e5afb656c188b16a3793b "printk: remove safe buffers", CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT is no longer useful. Remove it.

This change is not eligible for stable@.

Please Reply-To-All.

Great catch!

I have already sent pull request with printk changes for 6.3. I am going to queue this patch either for 6.3-rc or 6.4.

Best Regards,
Petr

#4 lore raw
Quoted 6 lines · Petr Mladek
Quoted 5 lines · Marc Aurèle La France

After 93d102f094be9beab28e5afb656c188b16a3793b "printk: remove safe buffers", CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT is no longer useful. Remove it.

This change is not eligible for stable@.

Quoted 8 lines
Quoted 1 line

Please Reply-To-All.

Great catch!

I have already sent pull request with printk changes for 6.3. I am going to queue this patch either for 6.3-rc or 6.4.

JFYI, the patch has been committed into printk/linux.git, branch for-6.4.

Best Regards,
Petr

#5 lore raw
Quoted 9 lines · Petr Mladek
Quoted 7 lines · Petr Mladek
Quoted 6 lines · Marc Aurèle La France

After 93d102f094be9beab28e5afb656c188b16a3793b "printk: remove safe buffers", CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT is no longer useful. Remove it.

This change is not eligible for stable@.

Please Reply-To-All.

Quoted 8 lines
Quoted 5 lines

Great catch!

I have already sent pull request with printk changes for 6.3. I am going to queue this patch either for 6.3-rc or 6.4.

JFYI, the patch has been committed into printk/linux.git, branch for-6.4.

Thanks and have a great day.

Marc.