On 06.02.2026 21:24, [email protected] wrote:
> From: Denis Mukhin <[email protected]> 
> 
> Add new "printk_ratelimit_ms" and "printk_ratelimit_burst" command line
> parameters for global rate-limiting controls.
> 
> Drop `const` and add `__read_mostly` for both global parameters
> printk_ratelimit_{ms,burst}.
> 
> Update command line documentation.
> 
> Signed-off-by: Denis Mukhin <[email protected]>

Like for the previous patch, I'm not sure we want/need this, so again only two
formal things:

> --- a/docs/misc/xen-command-line.pandoc
> +++ b/docs/misc/xen-command-line.pandoc
> @@ -2077,6 +2077,33 @@ compression is selected at build time from Kconfig.
>  This is a mask of C-states which are to be used preferably.  This option is
>  applicable only on hardware were certain C-states are exclusive of one 
> another.
>  
> +### printk_ratelimit_ms

New options want to use dashes in favor of underscores.

> --- a/xen/drivers/char/console.c
> +++ b/xen/drivers/char/console.c
> @@ -344,6 +344,20 @@ static void cf_check do_dec_thresh(unsigned char key, 
> bool unused)
>      do_adj_thresh(key);
>  }
>  
> +/*
> + * Global rate-limiting controls for printk().
> + */
> +
> +/* Minimum time in ms between messages */
> +static unsigned int __read_mostly printk_ratelimit_ms =
> +    CONFIG_PRINTK_RATELIMIT_MS;
> +integer_param("printk_ratelimit_ms", printk_ratelimit_ms);
> +
> +/* Number of messages we send before ratelimiting */
> +static unsigned int __read_mostly printk_ratelimit_burst =
> +    CONFIG_PRINTK_RATELIMIT_BURST;
> +integer_param("printk_ratelimit_burst", printk_ratelimit_burst);
> +
>  /*
>   * ********************************************************
>   * *************** ACCESS TO CONSOLE RING *****************
> @@ -1320,14 +1334,6 @@ static bool do_printk_ratelimit(unsigned int 
> ratelimit_ms,
>      return false;
>  }
>  
> -/* Minimum time in ms between messages */
> -static const unsigned int printk_ratelimit_ms =
> -    CONFIG_PRINTK_RATELIMIT_MS;
> -
> -/* Number of messages we send before ratelimiting */
> -static const unsigned int printk_ratelimit_burst =
> -    CONFIG_PRINTK_RATELIMIT_BURST;
> -
>  bool printk_ratelimit(void)
>  {
>      return do_printk_ratelimit(printk_ratelimit_ms, printk_ratelimit_burst);

Do things really need moving around?

Jan

Reply via email to