|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v6 1/4] xen/console: make console buffer size configurable
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.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |