On 06.02.2026 21:24, [email protected] wrote:
> From: Denis Mukhin <[email protected]> 
> 
> Introduce CONFIG_PRINTK_RATELIMIT_MS and CONFIG_PRINTK_RATELIMIT_BURST
> for configuring rate-limiting policy at the compile time.
> 
> Use symbols for global rate-limiting initialization in the console driver.
> 
> Signed-off-by: Denis Mukhin <[email protected]>

I'm not sure this is a direction we want to move into, so just one formal
remark below.

> --- a/xen/drivers/char/Kconfig
> +++ b/xen/drivers/char/Kconfig
> @@ -103,3 +103,28 @@ config XHCI
>         Enabling this option makes Xen use extra ~230KiB memory, even if XHCI 
> UART
>         is not selected.
>         If you have an x86 based system with USB3, say Y.
> +
> +config PRINTK_RATELIMIT_MS
> +     int "printk rate-limiting time window (milliseconds)"
> +     default 5000
> +     help
> +       Specifies the time window, in milliseconds, for rate-limited printk
> +       messages. No more than `CONFIG_PRINTK_RATELIMIT_BURST` messages will 
> be
> +       printed within this window.
> +
> +       Setting this value to 0 disables rate-limiting entirely.
> +
> +       Rate-limited messages are those controlled by the `loglvl` and
> +       `guest_loglvl` command-line parameters.
> +
> +config PRINTK_RATELIMIT_BURST
> +     int "printk rate-limited message burst size"
> +     default 10
> +     help
> +       Defines the maximum number of rate-limited printk messages that may be
> +       printed within each `CONFIG_PRINTK_RATELIMIT_MS` time window.
> +
> +       Setting this value to 0 disables rate-limiting entirely.
> +
> +       Rate-limited messages are those controlled by the `loglvl` and
> +       `guest_loglvl` command-line parameters.

printk() is implemented under drivers/char/, but I'm unconvinced of placing such
pretty much global controls here (rather than in common/Kconfig).

Jan

Reply via email to