[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v6 1/4] xen/console: make console buffer size configurable


  • To: dmukhin@xxxxxxxx
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 2 Jun 2026 10:34:16 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xR4NFCqj9/cjCwmx/NYPucrH4KJoOC0tFvXN7zGcj40=; b=BCLWuizSMu4+abFjB/YiGt4ElhdImqPH/v1avjXryTc8XUNIox0iCEkSv5VA9sBfZ+cllB5pcSPjdtQoXAMjr/8OS5c0a0SFmhJrJodnDsGp4l2ctrL6BlJgr4wqShQ+zU4kNd4QQURigO0Hv7wlUJ/Ozmaa0iS1Hq9pxKgxy6N/qWll5Vd7W/FXcn5O50cPPyqNbTTzbxNTuBobknsgoVMpRl1QbLM2ZwIOlWTXDMCTZYtGYXzyFmEAjkMWfxjFRKFmh75+ISW/uAVDJ7Gz23ohcb4znfhpqt0TvdcqCjlj6f2+sAYGYWiY0J/T1pRRxQ/eqI+Prj0hHXgHFgOUHw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HtnF/Sy+pOuIHD8gaMZNa1Of5n8FHfyTa10ieN0jj9R5qV8s5My6qRow6rJ0FSWbRIA2kmVV+ZHC958A5yUG8cBrDk19VApCCUxXz81BJqBpIKf13dAb4hz0vaBQ/CzRqcDuyNRlFAXraFvTJ7MaKbQmll7iNmeOE/sRaMLmf0/vdt+SlWobqmqLo5J7u8SE+Hz7XUG3nToQR6rvhAAquSGtwdujFEyAaaFNfwarHSUc5VtBdUv/fgNyZSHuEtadUO9xtVhhj79BU8KLd4hGJYs/3H4sxyR6m28U8XaYpWqzfj1D1wKVrJtzc7ZDbXFvJySGvTXKpj3ifo/4q1SajQ==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=citrix.com header.i="@citrix.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, andrew.cooper3@xxxxxxxxxx, anthony.perard@xxxxxxxxxx, jbeulich@xxxxxxxx, julien@xxxxxxx, michal.orzel@xxxxxxx, sstabellini@xxxxxxxxxx, Jason Andryuk <jason.andryuk@xxxxxxx>
  • Delivery-date: Tue, 02 Jun 2026 08:34:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Fri, May 08, 2026 at 05:57:11PM -0700, dmukhin@xxxxxxxx wrote:
> From: Denis Mukhin <dmukhin@xxxxxxxx> 
> 
> 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@xxxxxxxx>
> Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>
> ---
> 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.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.