* [PATCH] xen: increase static dmesg buffer to 64K
@ 2011-07-17 15:43 Olaf Hering
2011-07-18 7:30 ` Jan Beulich
0 siblings, 1 reply; 6+ messages in thread
From: Olaf Hering @ 2011-07-17 15:43 UTC (permalink / raw)
To: xen-devel
# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1310917380 -7200
# Node ID c6cade90d47f32e19f529930ba9f9acfa69f065f
# Parent 31dd84463eece20bd01c7aee22b52a0c06c67545
xen: increase static dmesg buffer to 64K
On large systems the static dmesg buffer will overflow the 16K buffer, early
messages are lost. Increase the size to 64K to capture all lines on systems
without serial console.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
diff -r 31dd84463eec -r c6cade90d47f xen/drivers/char/console.c
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -53,7 +53,7 @@ boolean_param("console_timestamps", opt_
static uint32_t __initdata opt_conring_size;
size_param("conring_size", opt_conring_size);
-#define _CONRING_SIZE 16384
+#define _CONRING_SIZE (64 * 1024)
#define CONRING_IDX_MASK(i) ((i)&(conring_size-1))
static char __initdata _conring[_CONRING_SIZE];
static char *__read_mostly conring = _conring;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xen: increase static dmesg buffer to 64K
2011-07-17 15:43 [PATCH] xen: increase static dmesg buffer to 64K Olaf Hering
@ 2011-07-18 7:30 ` Jan Beulich
2011-07-18 8:16 ` Olaf Hering
0 siblings, 1 reply; 6+ messages in thread
From: Jan Beulich @ 2011-07-18 7:30 UTC (permalink / raw)
To: Olaf Hering; +Cc: xen-devel
>>> On 17.07.11 at 17:43, Olaf Hering <olaf@aepfle.de> wrote:
> # HG changeset patch
> # User Olaf Hering <olaf@aepfle.de>
> # Date 1310917380 -7200
> # Node ID c6cade90d47f32e19f529930ba9f9acfa69f065f
> # Parent 31dd84463eece20bd01c7aee22b52a0c06c67545
> xen: increase static dmesg buffer to 64K
>
> On large systems the static dmesg buffer will overflow the 16K buffer, early
> messages are lost. Increase the size to 64K to capture all lines on systems
> without serial console.
Please don't - on small systems it's a waste, and on even larger
systems it still won't help. If anything, the dynamic allocation may
need to happen earlier. As you probably saw, console_init_postirq()
already sizes the buffer dependent on the number of CPUs in the
system.
Additionally I think we greatly reduced the amount of per-CPU
messages printed by default. So one other thing to do would be to
look into completely suppressing all per-CPU messages by default if
these are still causing trouble.
Jan
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
>
> diff -r 31dd84463eec -r c6cade90d47f xen/drivers/char/console.c
> --- a/xen/drivers/char/console.c
> +++ b/xen/drivers/char/console.c
> @@ -53,7 +53,7 @@ boolean_param("console_timestamps", opt_
> static uint32_t __initdata opt_conring_size;
> size_param("conring_size", opt_conring_size);
>
> -#define _CONRING_SIZE 16384
> +#define _CONRING_SIZE (64 * 1024)
> #define CONRING_IDX_MASK(i) ((i)&(conring_size-1))
> static char __initdata _conring[_CONRING_SIZE];
> static char *__read_mostly conring = _conring;
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xen: increase static dmesg buffer to 64K
2011-07-18 7:30 ` Jan Beulich
@ 2011-07-18 8:16 ` Olaf Hering
2011-07-18 8:31 ` Jan Beulich
2011-07-18 8:33 ` Keir Fraser
0 siblings, 2 replies; 6+ messages in thread
From: Olaf Hering @ 2011-07-18 8:16 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel
On Mon, Jul 18, Jan Beulich wrote:
> >>> On 17.07.11 at 17:43, Olaf Hering <olaf@aepfle.de> wrote:
> > # HG changeset patch
> > # User Olaf Hering <olaf@aepfle.de>
> > # Date 1310917380 -7200
> > # Node ID c6cade90d47f32e19f529930ba9f9acfa69f065f
> > # Parent 31dd84463eece20bd01c7aee22b52a0c06c67545
> > xen: increase static dmesg buffer to 64K
> >
> > On large systems the static dmesg buffer will overflow the 16K buffer, early
> > messages are lost. Increase the size to 64K to capture all lines on systems
> > without serial console.
>
> Please don't - on small systems it's a waste, and on even larger
> systems it still won't help. If anything, the dynamic allocation may
> need to happen earlier. As you probably saw, console_init_postirq()
> already sizes the buffer dependent on the number of CPUs in the
> system.
I think conring_size= should be evaluated very early. Is there a way to
allocate a range of mfns very early which can then be used for the dmesg
buffer?
Olaf
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xen: increase static dmesg buffer to 64K
2011-07-18 8:16 ` Olaf Hering
@ 2011-07-18 8:31 ` Jan Beulich
2011-07-18 8:33 ` Keir Fraser
1 sibling, 0 replies; 6+ messages in thread
From: Jan Beulich @ 2011-07-18 8:31 UTC (permalink / raw)
To: Olaf Hering; +Cc: xen-devel
>>> On 18.07.11 at 10:16, Olaf Hering <olaf@aepfle.de> wrote:
> On Mon, Jul 18, Jan Beulich wrote:
>
>> >>> On 17.07.11 at 17:43, Olaf Hering <olaf@aepfle.de> wrote:
>> > # HG changeset patch
>> > # User Olaf Hering <olaf@aepfle.de>
>> > # Date 1310917380 -7200
>> > # Node ID c6cade90d47f32e19f529930ba9f9acfa69f065f
>> > # Parent 31dd84463eece20bd01c7aee22b52a0c06c67545
>> > xen: increase static dmesg buffer to 64K
>> >
>> > On large systems the static dmesg buffer will overflow the 16K buffer,
> early
>> > messages are lost. Increase the size to 64K to capture all lines on systems
>> > without serial console.
>>
>> Please don't - on small systems it's a waste, and on even larger
>> systems it still won't help. If anything, the dynamic allocation may
>> need to happen earlier. As you probably saw, console_init_postirq()
>> already sizes the buffer dependent on the number of CPUs in the
>> system.
>
> I think conring_size= should be evaluated very early. Is there a way to
> allocate a range of mfns very early which can then be used for the dmesg
> buffer?
Allocation can happen after the second phase of memory setup (the
loop following the comment starting with "Walk every RAM region and
map it in its entirety" in xen/arch/x86/setup.c). With some caution
(and awareness of perhaps pointlessly using memory below 4G) it
should even be doable after the first phase of memory initialization
(the preceding loop) or at the point where acpi_boot_table_init()
gets called (because that I expect to be where the bulk of the
messages comes from).
Jan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xen: increase static dmesg buffer to 64K
2011-07-18 8:16 ` Olaf Hering
2011-07-18 8:31 ` Jan Beulich
@ 2011-07-18 8:33 ` Keir Fraser
2011-07-18 8:45 ` Olaf Hering
1 sibling, 1 reply; 6+ messages in thread
From: Keir Fraser @ 2011-07-18 8:33 UTC (permalink / raw)
To: Olaf Hering, Jan Beulich; +Cc: xen-devel
On 18/07/2011 09:16, "Olaf Hering" <olaf@aepfle.de> wrote:
> On Mon, Jul 18, Jan Beulich wrote:
>
>>>>> On 17.07.11 at 17:43, Olaf Hering <olaf@aepfle.de> wrote:
>>> # HG changeset patch
>>> # User Olaf Hering <olaf@aepfle.de>
>>> # Date 1310917380 -7200
>>> # Node ID c6cade90d47f32e19f529930ba9f9acfa69f065f
>>> # Parent 31dd84463eece20bd01c7aee22b52a0c06c67545
>>> xen: increase static dmesg buffer to 64K
>>>
>>> On large systems the static dmesg buffer will overflow the 16K buffer, early
>>> messages are lost. Increase the size to 64K to capture all lines on systems
>>> without serial console.
>>
>> Please don't - on small systems it's a waste, and on even larger
>> systems it still won't help. If anything, the dynamic allocation may
>> need to happen earlier. As you probably saw, console_init_postirq()
>> already sizes the buffer dependent on the number of CPUs in the
>> system.
>
> I think conring_size= should be evaluated very early. Is there a way to
> allocate a range of mfns very early which can then be used for the dmesg
> buffer?
Are you actually losing messages because you can't allocate the larger
console ring early enough? It seems a bit unlikely, but possible I suppose.
Anyhow, the normal memory allocator is available plenty early enough. You'd
just need to do the allocation earlier than console_init_postirq(). Sometime
soon after the call to end_boot_allocator() would work nicely.
-- Keir
> Olaf
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xen: increase static dmesg buffer to 64K
2011-07-18 8:33 ` Keir Fraser
@ 2011-07-18 8:45 ` Olaf Hering
0 siblings, 0 replies; 6+ messages in thread
From: Olaf Hering @ 2011-07-18 8:45 UTC (permalink / raw)
To: Keir Fraser; +Cc: xen-devel, Jan Beulich
On Mon, Jul 18, Keir Fraser wrote:
> On 18/07/2011 09:16, "Olaf Hering" <olaf@aepfle.de> wrote:
> > I think conring_size= should be evaluated very early. Is there a way to
> > allocate a range of mfns very early which can then be used for the dmesg
> > buffer?
>
> Are you actually losing messages because you can't allocate the larger
> console ring early enough? It seems a bit unlikely, but possible I suppose.
Yes, I was booting with conring_size=, but the bulk of messages were
already printed at that point. My 80 cpu testbox had 24K in dmesg buffer
with my patch.
> Anyhow, the normal memory allocator is available plenty early enough. You'd
> just need to do the allocation earlier than console_init_postirq(). Sometime
> soon after the call to end_boot_allocator() would work nicely.
I will put that on my TODO list, and look at your and Jans suggestion to
move the dmesg buffer allocation earlier.
Olaf
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-07-18 8:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-17 15:43 [PATCH] xen: increase static dmesg buffer to 64K Olaf Hering
2011-07-18 7:30 ` Jan Beulich
2011-07-18 8:16 ` Olaf Hering
2011-07-18 8:31 ` Jan Beulich
2011-07-18 8:33 ` Keir Fraser
2011-07-18 8:45 ` Olaf Hering
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.