Re: [PATCH v2] printk: increase the ring buffer for more than 16 CPUs by default

From: Petr Mladek

Date: Tue Sep 29 2026 - 09:58:58 EST


On Sun 2026-09-27 18:17:54, Sang-Heon Jeon wrote:
> The default LOG_BUF_SHIFT is 17, which means 128 KB, and
> LOG_CPU_MAX_BUF_SHIFT is 12, which means 4 KB per CPU.
>
> By default the ring buffer is increased when
> (num_possible_cpus() - 1) * 4 KB > 64 KB, which requires more than 17
> CPUs.
>
> Remove the explicit subtraction of one, so the ring buffer is increased
> for more than 16 CPUs, which is a power of two. Also fix the outdated
> comment.
>
> Suggested-by: Petr Mladek <pmladek@xxxxxxxx>
> Signed-off-by: Sang-Heon Jeon <ekffu200098@xxxxxxxxx>

Looks good to me:

Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>

Best Regards,
Petr