Openbmc Archive on lore.kernel.org
 help / color / Atom feed
From: "Milton Miller II" <miltonm@us.ibm.com>
To: Joel Stanley <joel@jms.id.au>
Cc: Andrew Jeffery <andrew@aj.id.au>,
	OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: RE: [PATCH 1/3] ARM: dts: rainier: Add reserved memory for ramoops
Date: Tue, 6 Oct 2020 04:25:06 +0000
Message-ID: <OF049DC1D4.E5E0E847-ON002585F9.0017C7A1-002585F9.00184577@notes.na.collabserv.com> (raw)
In-Reply-To: <CACPK8Xd-3e+6EO1dz7aQZqTpxamDcVPfqAgbneg2_W=vpto3Kw@mail.gmail.com>

On October 5, 2020 about 10:23 in some timezone, Joel Stanley wrote:
>Subject: [EXTERNAL] Re: [PATCH 1/3] ARM: dts: rainier: Add reserved
>memory for ramoops
>
>On Fri, 2 Oct 2020 at 06:35, Andrew Jeffery <andrew@aj.id.au> wrote:
>>
>> Reserve a 1MiB region of memory to record kmsg dumps and console
>state
>> into 16kiB ring-buffer slots. The sizing allows for up to 32 dumps
>to be
>> captured and read out.
>>
>> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
>> ---
>>  arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts
>b/arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts
>> index e6f422edf454..46a0e95049fd 100644
>> --- a/arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts
>> +++ b/arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts
>> @@ -47,6 +47,14 @@ reserved-memory {
>>                 #size-cells = <1>;
>>                 ranges;
>>
>> +               ramoops@b7f00000 {
>> +                       compatible = "ramoops";
>> +                       reg = <0xb7f00000 0x100000>;
>> +                       record-size = <0x4000>;
>> +                       console-size = <0x4000>;
>
>This is conserative. We've got plenty of space, how about we make it
>bigger?
>
>$ git grep console-size *.dts* | grep -Po "0x([0-9]+)" | xargs printf
>"%x\n" | sort -n
>8000
>8000
>10000
>10000
>20000
>20000
>20000
>20000
>20000
>60000
>100000
>
>The median is 128KB, which sounds reasonable.

How big is the dmesg after we are booted?   How big is the default 
kernel buffer for 2 cpus (the kernel config has a base size, but 
also a dynamic size with a base + n * cpu min at boot).

Having the console space larger than printk buffer will not help.

We could config the buffer up if we are not capturing enough of a 
boot and some runtime.

>
>$ git grep record-size *.dts* | grep -Po "0x([0-9]+)" | xargs printf
>"%x\n"
>20000
>400
>400
>20000
>20000
>20000
>10000
>10000
>10000
>10000
>20000
>
>64KB is the median record size.
>
This probably affects the effective compression, assuming
each block is a seperate compression input.

>> +                       pmsg-size = <0x4000>;
>
>Do we want to add ftrace too?
>
>Should we also add max-reason = KMSG_DUMP_EMERG?
>

The admin guide lists KMSG_DUMP_OOPS and KMSG_DUMP_PANIC ?
https://www.kernel.org/doc/html/latest/admin-guide/ramoops.html

We could have something monitoring for OOPS , copying to a log and 
then unlinking the pstore after committed.

>Logging reboots and shutdowns is informative (you know if a reboot
>was
>intentional or due to a crash that wasn't recorded) and allows for
>testing.
>

That should be exposed from audit logging?
but yes.

milton

>Cheers,
>
>Joel
>
>> +               };
>> +
>>                 flash_memory: region@B8000000 {
>>                         no-map;
>>                         reg = <0xB8000000 0x04000000>; /* 64M */
>> --
>> 2.25.1
>>
>
>


  parent reply index

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02  6:34 [PATCH 0/3] Enable pstore for Rainier Andrew Jeffery
2020-10-02  6:34 ` [PATCH 1/3] ARM: dts: rainier: Add reserved memory for ramoops Andrew Jeffery
2020-10-06  3:22   ` Joel Stanley
2020-10-16  3:38     ` Andrew Jeffery
2020-10-06  4:25   ` Milton Miller II [this message]
2020-10-06  4:29     ` Andrew Jeffery
2020-10-06  4:44     ` Milton Miller II
2020-10-02  6:34 ` [PATCH 2/3] ARM: config: Enable PSTORE in aspeed_g5_defconfig Andrew Jeffery
2020-10-06  3:51   ` Joel Stanley
2020-10-02  6:34 ` [PATCH 3/3] ARM: dts: rainier: Don't shout addresses Andrew Jeffery
2020-10-06  3:51   ` Joel Stanley
2020-10-02  6:38 ` [PATCH 0/3] Enable pstore for Rainier Andrew Jeffery
2020-10-07  7:21 ` Joel Stanley
2020-10-10  2:50   ` Andrew Jeffery

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=OF049DC1D4.E5E0E847-ON002585F9.0017C7A1-002585F9.00184577@notes.na.collabserv.com \
    --to=miltonm@us.ibm.com \
    --cc=andrew@aj.id.au \
    --cc=joel@jms.id.au \
    --cc=openbmc@lists.ozlabs.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

Openbmc Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/openbmc/0 openbmc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 openbmc openbmc/ https://lore.kernel.org/openbmc \
		openbmc@lists.ozlabs.org openbmc@ozlabs.org
	public-inbox-index openbmc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.ozlabs.lists.openbmc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git