Skip to content

Commit

Permalink
init/Kconfig: Fix CPU number in LOG_CPU_MAX_BUF_SHIFT description
Browse files Browse the repository at this point in the history
Currently, LOG_BUF_SHIFT defaults to 17, which is 2 ^ 17 bytes = 128 KB,
and LOG_CPU_MAX_BUF_SHIFT defaults to 12, which is 2 ^ 12 bytes = 4 KB.

Half of 128 KB is 64 KB, so more than 16 CPUs are required for the value
to be used, as then the sum of contributions is greater than 64 KB for
the first time. My guess is, that the description was written with the
configuration values used in the SUSE in mind.

Fixes: 23b2899 ("printk: allow increasing the ring buffer depending on the number of CPUs")
Cc: Luis R. Rodriguez <[email protected]>
Cc: [email protected]
Signed-off-by: Paul Menzel <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Signed-off-by: Petr Mladek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
paulmenzel authored and pmladek committed Nov 3, 2020
1 parent 8119c43 commit 0f7636e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ config LOG_CPU_MAX_BUF_SHIFT
with more CPUs. Therefore this value is used only when the sum of
contributions is greater than the half of the default kernel ring
buffer as defined by LOG_BUF_SHIFT. The default values are set
so that more than 64 CPUs are needed to trigger the allocation.
so that more than 16 CPUs are needed to trigger the allocation.

Also this option is ignored when "log_buf_len" kernel parameter is
used as it forces an exact (power of two) size of the ring buffer.
Expand Down

0 comments on commit 0f7636e

Please sign in to comment.