All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: dmukhin@ford.com
Cc: xen-devel@lists.xenproject.org, andrew.cooper3@citrix.com,
	anthony.perard@vates.tech, jbeulich@suse.com, julien@xen.org,
	michal.orzel@amd.com, sstabellini@kernel.org,
	Jason Andryuk <jason.andryuk@amd.com>
Subject: Re: [PATCH v6 1/4] xen/console: make console buffer size configurable
Date: Tue, 2 Jun 2026 10:34:16 +0200	[thread overview]
Message-ID: <ah6ViEOEJ8nD80VM@macbook.local> (raw)
In-Reply-To: <20260509005714.892018-2-dmukhin@ford.com>

On Fri, May 08, 2026 at 05:57:11PM -0700, dmukhin@ford.com wrote:
> From: Denis Mukhin <dmukhin@ford.com> 
> 
> Add new CONRING_SHIFT Kconfig parameter to specify the boot console buffer size
> as a power of 2.
> 
> The supported range is [14..27] -> [16KiB..128MiB].
> 
> Set default to 15 (32 KiB).
> 
> Resolves: https://gitlab.com/xen-project/xen/-/issues/185
> Signed-off-by: Denis Mukhin <dmukhin@ford.com>
> Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
> ---
> Changes since v5:
> - shortened the Kconfig option description
> - kept Jason's R-b since the change is minimal - just dropping
>   few lines from the Kconfig description
> ---
>  docs/misc/xen-command-line.pandoc |  5 +++--
>  xen/drivers/char/Kconfig          | 15 +++++++++++++++
>  xen/drivers/char/console.c        |  6 +++---
>  3 files changed, 21 insertions(+), 5 deletions(-)
> 
> diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line.pandoc
> index 6c77129732bf..29393631d885 100644
> --- a/docs/misc/xen-command-line.pandoc
> +++ b/docs/misc/xen-command-line.pandoc
> @@ -425,10 +425,11 @@ The following are examples of correct specifications:
>  ### conring_size
>  > `= <size>`
>  
> -> Default: `conring_size=16k`
> -
>  Specify the size of the console ring buffer.

Hm, since you are adjusting the text of the option anyway, the above
is not fully accurate.  The size of the console ring buffer will be
the maximum between the built-time value and the command line option.

>  
> +The default console ring buffer size is selected at build time via
> +CONFIG_CONRING_SHIFT setting.
> +
>  ### console
>  > `= List of [ vga | com1[H,L] | com2[H,L] | pv | dbgp | ehci | xhci | none ]`
>  
> diff --git a/xen/drivers/char/Kconfig b/xen/drivers/char/Kconfig
> index 8e49a52c735b..11f48415c12a 100644
> --- a/xen/drivers/char/Kconfig
> +++ b/xen/drivers/char/Kconfig
> @@ -95,6 +95,21 @@ config SERIAL_TX_BUFSIZE
>  
>  	  Default value is 32768 (32KiB).
>  
> +config CONRING_SHIFT

The option just above specifies the size in bytes, and then the code
rounds down to the nearest power of 2, but I don't think we can't do
the same here, due to how SERIAL_TX_BUFSIZE is used to size an array.

> +	int "Console ring buffer size (power of 2)"
> +	range 14 27
> +	default 15
> +	help
> +	  Select the boot console ring buffer size as a power of 2.
> +	  Run-time console ring buffer size is the same as the boot console ring
> +	  buffer size, unless overridden via 'conring_size=' boot parameter.

I don't think the above text is accurate, if `conring_size=` is not
specified on the command line the runtime console buffer size will be
the maximum between the build time value and `num_present_cpus() << (9
+ xenlog_lower_thresh)`.  See console_init_postirq().

Thanks, Roger.


  reply	other threads:[~2026-06-02  8:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-09  0:57 [PATCH v6 0/4] xen/console: configurable conring size dmukhin
2026-05-09  0:57 ` [PATCH v6 1/4] xen/console: make console buffer size configurable dmukhin
2026-06-02  8:34   ` Roger Pau Monné [this message]
2026-05-09  0:57 ` [PATCH v6 2/4] xen/console: promote conring{,_size} to __ro_after_init dmukhin
2026-05-09  0:57 ` [PATCH v6 3/4] xen/console: use memcpy() in console_init_ring() dmukhin
2026-06-02  9:05   ` Roger Pau Monné
2026-05-09  0:57 ` [PATCH v6 4/4] xen/console: switch conring runtime allocation to xvmalloc dmukhin
2026-06-02  9:49   ` Roger Pau Monné
2026-06-02  9:54     ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ah6ViEOEJ8nD80VM@macbook.local \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=dmukhin@ford.com \
    --cc=jason.andryuk@amd.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.