linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] init: Shrink early messages to prevent overflowing the kernel log buffer
@ 2011-02-25 18:06 Mike Travis
  2011-02-25 18:06 ` [PATCH 1/4] printk: Allocate kernel log buffer earlier Mike Travis
                   ` (3 more replies)
  0 siblings, 4 replies; 32+ messages in thread
From: Mike Travis @ 2011-02-25 18:06 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: David Rientjes, Jack Steiner, Robin Holt, Len Brown,
	Thomas Gleixner, H. Peter Anvin, Andrew Morton, Yinghai Lu,
	linux-acpi, x86, linux-kernel


On larger systems, information in the kernel log is lost because
there is so much early text printed, that it overflows the static
log buffer before the log_buf_len kernel parameter can be processed,
and a bigger log buffer allocated.

Distros are relunctant to increase memory usage by increasing the
size of the static log buffer, so minimize the problem by allocating
the new log buffer as early as possible.  Unfortunately allocating
early does not recover all the early messages, so we also need to
reduce the amount of characters those early messages generate.

Here are the stats testing on a system with 248 nodes, 606 EFI
mem ranges, 1984 cores

after get_log_buff_early:  (17% overflow)

	[    0.000000] early log_buf free: -45723/262183(-17%)
	[    0.000000] first line: : mem339: type=7, attr=0xf, range=[0x00000e6000000000-0x00000e6fff000000) (6552

Here I enabled some cores that were disabled so now the system
has 248 nodes, 606 EFI mem ranges, 2368 cores.

after minimize-time-zero-msgs:  (5% overflow)

[0] early log_buf free: -15184/262172(-5%)
[0] first line: [0x000000007226e000-0x0000000072271000) (0MB) <6>[0] EFI: mem67: type=3, attr=0

after minimize-srat-msgs.v2: (28% free)

[0] early log_buf free: 73556/188616(28%)
[0] first line: <6>[0] Initializing cgroup subsys cpuset <6>[0] Initializing cgroup subsys cpu

Some previous stats from testing these changes on our current lab
UV systems.  (Both of these systems lost all of the e820 and EFI
memmap ranges before the changes.)

System X:
	8,793,945,145,344 bytes of system memory
	256 nodes
	599 EFI Mem ranges
	4096 cpu_ids
	43% of static log buffer unused

System Y:
	11,779,115,188,224 bytes of system memory
	492 Nodes
	976 EFI Mem ranges
	1968 cpu_ids
	17% of static log buffer unused

The last stat is how close the static log buffer came
to overflowing.  While these resources are fairly close
to today's max limits, there is not a lot of head room
for growth.

An alternative for the future might be to create a larger
static log buffer in the __initdata section, and then
always allocate a dynamically sized log buffer to replace
it.  This would also allow shrinking the log buffer for
memory tight situations.  But it would add complexity to
the code.

-- 

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2011-04-08  6:40 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-25 18:06 [PATCH 0/4] init: Shrink early messages to prevent overflowing the kernel log buffer Mike Travis
2011-02-25 18:06 ` [PATCH 1/4] printk: Allocate kernel log buffer earlier Mike Travis
2011-02-27 12:09   ` Ingo Molnar
2011-02-27 12:15     ` Ingo Molnar
2011-02-28  1:34       ` Yinghai Lu
2011-02-28  8:01         ` Ingo Molnar
2011-02-28 19:26           ` Mike Travis
2011-03-01  7:35             ` Ingo Molnar
2011-02-28  8:06         ` Ingo Molnar
2011-02-28 19:18           ` Yinghai Lu
2011-02-28 19:29           ` Mike Travis
2011-02-28 19:23         ` Mike Travis
2011-02-28 19:46           ` Yinghai Lu
2011-02-28 20:02             ` Mike Travis
2011-02-28 22:59               ` Yinghai Lu
2011-03-31  0:41                 ` [PATCH 1/2] memblock: add error return when CONFIG_HAVE_MEMBLOCK is not set Mike Travis
2011-03-31  1:40                   ` Yinghai Lu
2011-03-31 15:23                     ` Mike Travis
2011-03-31 16:17                       ` Yinghai Lu
2011-04-07 19:43                   ` Mike Travis
2011-04-08  6:40                     ` Ingo Molnar
2011-03-01  7:42           ` [PATCH 1/4] printk: Allocate kernel log buffer earlier Ingo Molnar
2011-02-28 19:14     ` Mike Travis
2011-02-25 18:06 ` [PATCH 2/4] printk: Break out printk_time Mike Travis
2011-02-27 11:56   ` Ingo Molnar
2011-02-25 18:06 ` [PATCH 3/4] printk: Minimize time zero output Mike Travis
2011-02-25 18:06 ` [PATCH 4/4] x86: Minimize SRAT messages Mike Travis
2011-02-27 12:03   ` Ingo Molnar
2011-02-28 19:41     ` Mike Travis
2011-03-01  7:51       ` Ingo Molnar
2011-03-31  2:38         ` Len Brown
2011-03-31  4:40           ` Yinghai Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).