public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Remove orphaned CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT
@ 2023-02-21  5:10 Marc Aurèle La France
  2023-02-21  8:33 ` John Ogness
  2023-02-21 15:08 ` Petr Mladek
  0 siblings, 2 replies; 6+ messages in thread
From: Marc Aurèle La France @ 2023-02-21  5:10 UTC (permalink / raw)
  To: John Ogness, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 3758 bytes --]

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.

Signed-off-by: Marc Aurèle La France <tsi@tuyoix.net>

diff -aNpRruz -X /etc/diff.excludes linux-6.2.0/arch/powerpc/configs/microwatt_defconfig devel-6.2.0/arch/powerpc/configs/microwatt_defconfig
--- linux-6.2.0/arch/powerpc/configs/microwatt_defconfig	2023-02-19 15:24:22.000000000 -0700
+++ devel-6.2.0/arch/powerpc/configs/microwatt_defconfig	2023-02-20 21:39:39.057268798 -0700
@@ -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
--- linux-6.2.0/arch/riscv/configs/nommu_k210_defconfig	2023-02-19 15:24:22.000000000 -0700
+++ devel-6.2.0/arch/riscv/configs/nommu_k210_defconfig	2023-02-20 21:40:01.349181760 -0700
@@ -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
--- linux-6.2.0/arch/riscv/configs/nommu_k210_sdcard_defconfig	2023-02-19 15:24:22.000000000 -0700
+++ devel-6.2.0/arch/riscv/configs/nommu_k210_sdcard_defconfig	2023-02-20 21:39:46.721238871 -0700
@@ -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
--- linux-6.2.0/arch/riscv/configs/nommu_virt_defconfig	2023-02-19 15:24:22.000000000 -0700
+++ devel-6.2.0/arch/riscv/configs/nommu_virt_defconfig	2023-02-20 21:39:55.329205262 -0700
@@ -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
--- linux-6.2.0/init/Kconfig	2023-02-19 15:24:22.000000000 -0700
+++ devel-6.2.0/init/Kconfig	2023-02-20 21:40:23.329095967 -0700
@@ -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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Remove orphaned CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT
  2023-02-21  5:10 [PATCH] Remove orphaned CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT Marc Aurèle La France
@ 2023-02-21  8:33 ` John Ogness
  2023-02-21  8:41   ` Sergey Senozhatsky
  2023-02-21 15:08 ` Petr Mladek
  1 sibling, 1 reply; 6+ messages in thread
From: John Ogness @ 2023-02-21  8:33 UTC (permalink / raw)
  To: Marc Aurèle La France, linux-kernel
  Cc: Petr Mladek, Sergey Senozhatsky, Steven Rostedt

(Added the rest of the printk team CC.)

On 2023-02-20, Marc Aurèle La France <tsi@tuyoix.net> wrote:
> 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.
>
> Signed-off-by: Marc Aurèle La France <tsi@tuyoix.net>

Reviewed-by: John Ogness <john.ogness@linutronix.de>

> diff -aNpRruz -X /etc/diff.excludes linux-6.2.0/arch/powerpc/configs/microwatt_defconfig devel-6.2.0/arch/powerpc/configs/microwatt_defconfig
> --- linux-6.2.0/arch/powerpc/configs/microwatt_defconfig	2023-02-19 15:24:22.000000000 -0700
> +++ devel-6.2.0/arch/powerpc/configs/microwatt_defconfig	2023-02-20 21:39:39.057268798 -0700
> @@ -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
> --- linux-6.2.0/arch/riscv/configs/nommu_k210_defconfig	2023-02-19 15:24:22.000000000 -0700
> +++ devel-6.2.0/arch/riscv/configs/nommu_k210_defconfig	2023-02-20 21:40:01.349181760 -0700
> @@ -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
> --- linux-6.2.0/arch/riscv/configs/nommu_k210_sdcard_defconfig	2023-02-19 15:24:22.000000000 -0700
> +++ devel-6.2.0/arch/riscv/configs/nommu_k210_sdcard_defconfig	2023-02-20 21:39:46.721238871 -0700
> @@ -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
> --- linux-6.2.0/arch/riscv/configs/nommu_virt_defconfig	2023-02-19 15:24:22.000000000 -0700
> +++ devel-6.2.0/arch/riscv/configs/nommu_virt_defconfig	2023-02-20 21:39:55.329205262 -0700
> @@ -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
> --- linux-6.2.0/init/Kconfig	2023-02-19 15:24:22.000000000 -0700
> +++ devel-6.2.0/init/Kconfig	2023-02-20 21:40:23.329095967 -0700
> @@ -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

Thanks!

John Ogness

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Remove orphaned CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT
  2023-02-21  8:33 ` John Ogness
@ 2023-02-21  8:41   ` Sergey Senozhatsky
  0 siblings, 0 replies; 6+ messages in thread
From: Sergey Senozhatsky @ 2023-02-21  8:41 UTC (permalink / raw)
  To: John Ogness
  Cc: Marc Aurèle La France, linux-kernel, Petr Mladek,
	Sergey Senozhatsky, Steven Rostedt

On (23/02/21 09:39), John Ogness wrote:
> (Added the rest of the printk team CC.)
> 
> On 2023-02-20, Marc Aurèle La France <tsi@tuyoix.net> wrote:
> > 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.
> >
> > Signed-off-by: Marc Aurèle La France <tsi@tuyoix.net>
> 
> Reviewed-by: John Ogness <john.ogness@linutronix.de>

Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Remove orphaned CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT
  2023-02-21  5:10 [PATCH] Remove orphaned CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT Marc Aurèle La France
  2023-02-21  8:33 ` John Ogness
@ 2023-02-21 15:08 ` Petr Mladek
  2023-03-27 11:19   ` Petr Mladek
  1 sibling, 1 reply; 6+ messages in thread
From: Petr Mladek @ 2023-02-21 15:08 UTC (permalink / raw)
  To: Marc Aurèle La France; +Cc: John Ogness, linux-kernel

On Mon 2023-02-20 22:10:32, Marc Aurèle La France wrote:
> 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!

Reviewed-by: Petr Mladek <pmladek@suse.com>

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Remove orphaned CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT
  2023-02-21 15:08 ` Petr Mladek
@ 2023-03-27 11:19   ` Petr Mladek
  2023-03-27 13:16     ` Marc Aurèle La France
  0 siblings, 1 reply; 6+ messages in thread
From: Petr Mladek @ 2023-03-27 11:19 UTC (permalink / raw)
  To: Marc Aurèle La France; +Cc: John Ogness, linux-kernel

On Tue 2023-02-21 16:08:37, Petr Mladek wrote:
> On Mon 2023-02-20 22:10:32, Marc Aurèle La France wrote:
> > 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!
> 
> Reviewed-by: Petr Mladek <pmladek@suse.com>
> 
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Remove orphaned CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT
  2023-03-27 11:19   ` Petr Mladek
@ 2023-03-27 13:16     ` Marc Aurèle La France
  0 siblings, 0 replies; 6+ messages in thread
From: Marc Aurèle La France @ 2023-03-27 13:16 UTC (permalink / raw)
  To: Petr Mladek; +Cc: John Ogness, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 679 bytes --]

On Mon, 27 Mar 2023, Petr Mladek wrote:
> On Tue 2023-02-21 16:08:37, Petr Mladek wrote:
>> On Mon 2023-02-20 22:10:32, Marc Aurèle La France wrote:
>>> 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!
>> Reviewed-by: Petr Mladek <pmladek@suse.com>

>> 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-03-27 13:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-21  5:10 [PATCH] Remove orphaned CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT Marc Aurèle La France
2023-02-21  8:33 ` John Ogness
2023-02-21  8:41   ` Sergey Senozhatsky
2023-02-21 15:08 ` Petr Mladek
2023-03-27 11:19   ` Petr Mladek
2023-03-27 13:16     ` Marc Aurèle La France

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox