doc: Add osdump guide
RFC PATCH 3/7 doc: Add osdump guide
From: qiruipeng <[email protected]>
Add osdump guide for the users who try to compile with osdump enabled, use, and analysis real system problem.
--- Documentation/admin-guide/index.rst | 1 + Documentation/admin-guide/osdump.rst | 94 ++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 Documentation/admin-guide/osdump.rst
Documentation/admin-guide/index.rst +1 -0
@@ -116,6 +116,7 @@ configure specific aspects of kernel behavior to your liking. mono namespaces/index numastat + osdump parport perf-security pm/index
Documentation/admin-guide/osdump.rst new file +94 -0
94 lines not on this page · raw message
Signature · 1 line
2.17.1
Quoted 7 lines · Ruipeng Qi
From: qiruipeng <[email protected]>
Add osdump guide for the users who try to compile with osdump enabled, use, and analysis real system problem.
Signed-off-by qiruipeng <[email protected]>---
Why is this [3/7] only posted on mailing lists (aka why LKML only have this patch instead of full RFC series)?
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Hi, comments below.
Documentation/admin-guide/osdump.rst line 5
Quoted 7 lines · Ruipeng Qi
+++
b/Documentation/admin-guide/osdump.rstDocumentation/admin-guide/osdump.rst new file +5
-0@@ -0,0 +1,94 @@ +.. SPDX-License-Identifier: GPL-2.0 + +=================================================== +Documentation for osdump - The Os Minidump Solution +===================================================
I would title this simply: osdump
Also, a general comment: is it "osdump" or "Osdump"? I think you should choose one and use it consistently.
Quoted 20 lines
Documentation/admin-guide/osdump.rst new file +20
-0+ +Overview +======== + +Osdump is a new crash dumping solution aiming at specific embedded +devices within Automotive or Industrial having the following features: + - limited memory. + - require quick reboots after system faults. + +To minimize the dump file size and maximize the dump process speed, +Osdump provides the following features: + - excludes userspace memory, focusing solely on resolving OS-related issues. + - eliminates constant data such as text segments. + - core OS data for dumping, this includes: + - static allocated bss and data segments + - dynamic data such as: + - slub data for small-sized data + - some large-sized data alloced in pages. + - compresses dump data to help reduce dump file size +
Documentation/admin-guide/osdump.rst line 35
Quoted 10 lines
Documentation/admin-guide/osdump.rst new file +9
-0+Considering the large volume of non-contiguous data, a binary data format is +used directly. + +By utilizing the dump file and vmlinux, a standard elf format file can be +reassembled and parsed using crash tool. +Declare +======== +Mainly test on arm64 with 2G DDR, selecting slub as SLAB allocator, 39-bit for +address space size.
This declaration isn't very useful information, I would take it out. You already wrote that it targets small memory configurations -- if there are hard limits, those should obviously be stated.
Documentation/admin-guide/osdump.rst line 46
Quoted 11 lines
Documentation/admin-guide/osdump.rst new file +11
-0+ +Configure and Build +=================== + +Kernel config +------------- +Disable CRASH_CORE, SLUB_DEBUG, and SLUB_TINY, and then select CONFIG_OS_MINIDUMP. + +Dts config +---------- +Add one reserved region for osdump. Its size depends DDR size you are using. Here
I'm not sure about the use of "DDR" here and throughout the document. Why not simply refer to it as "amount of memory" or RAM?
Documentation/admin-guide/osdump.rst line 57
Quoted 11 lines
Documentation/admin-guide/osdump.rst new file +11
-0+add one 16M reserved region with 2G's DDR. + +osdump { + compatible = "osdump"; + reg = <0 0x64000000 0 0x1000000>; +}; + +Build the image after you have done with configuration. + +Trigger one panic and analysis it +=================================
*analyse (or analyze)
Documentation/admin-guide/osdump.rst line 61
Quoted 4 lines
Documentation/admin-guide/osdump.rst new file +4
-0+ +0) Precondition +--------------- +DDR won't poweroff during panic. Its content should not be lose.
*lost
Documentation/admin-guide/osdump.rst line 65
Quoted 4 lines
Documentation/admin-guide/osdump.rst new file +4
-0+ +1) Generate dump file +--------------------- +When a panic occurs, it will dump core data into specific reserved region.
what does "it" refer to? Maybe write "the kernel".
I would also say "the core data" (instead of just "core data") since you defined the "core" term above.
Documentation/admin-guide/osdump.rst line 75
Quoted 10 lines
Documentation/admin-guide/osdump.rst new file +10
-0+ +echo c > /proc/sysrq-trigger + +2) Get dump file +---------------- +When system reboot from panic, run the following command to get dump file. + +cat /proc/osdump > ./osdump + +Got 13M dump file on my side.
This isn't a sentence. Maybe write it out as "On a sample configuration with X amount of memory, this results in a 13M dump file." or something like that.
Documentation/admin-guide/osdump.rst
Quoted 9 lines
Documentation/admin-guide/osdump.rst new file +9
-0+ +3) Run crash tool to generate standard elf file +----------------------------------------------- + +crash --enable_raw_dumpfile ./vmlinux ./osdump -m vabits_actual=39 --machdep\ + kimage_voffset=0xffffffbf8f000000 --machdep phys_offset=0x80000000 + +Add new feature for crash tool that reassemble a standard elf format file with +the dump file and vmlinux.
I'm not sure what this line refers to.
Quoted 1 line
Will submit this patch later.
This information doesn't belong in the documentation.
Documentation/admin-guide/osdump.rst line 89
Quoted 5 lines
Documentation/admin-guide/osdump.rst new file +5
-0+ +4) Analysis with crash tool +--------------------------- + +crash ./vmlinux ./osdump_elf
I would add a sentence above this saying something like "You should now be able to use the crash utility as usual:"
Documentation/admin-guide/osdump.rst line 94
Quoted 4 lines
Documentation/admin-guide/osdump.rst new file +4
-0+ +Note +==== +disable when select CRASH_CORE, SLUB_DEBUG, or SLUB_TINY.
Again, this needs a full sentence. Something like: "osdump is incompatible with the following options: CRASH_CORE, ..."
Although you kind of already wrote this above, so maybe those two things could be merged and not repeated.
Please also make sure to thread your emails (using In-Reply-To: or git-send-email --thread) when sending out a patch series, that should be the default when using git send-email.
Hope this helps.
Vegard
Randy Dunlap
reviewerQuoted 19 lines · Ruipeng Qi
From: qiruipeng <[email protected]>
Add osdump guide for the users who try to compile with osdump enabled, use, and analysis real system problem.
Signed-off-by qiruipeng <[email protected]>--- Documentation/admin-guide/index.rst | 1 + Documentation/admin-guide/osdump.rst | 94 ++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 Documentation/admin-guide/osdump.rstDocumentation/admin-guide/osdump.rst new file +0
-0
Documentation/admin-guide/osdump.rst line 4
Quoted 4 lines
Documentation/admin-guide/osdump.rst new file +4
-0@@ -0,0 +1,94 @@ +.. SPDX-License-Identifier: GPL-2.0 + +=================================================== +Documentation for osdump - The Os Minidump Solution
OS ?
Documentation/admin-guide/osdump.rst line 10
Quoted 6 lines
Documentation/admin-guide/osdump.rst new file +6
-0+=================================================== + +Overview +======== + +Osdump is a new crash dumping solution aiming at specific embedded
crash-dumping
Documentation/admin-guide/osdump.rst line 23
Quoted 13 lines
Documentation/admin-guide/osdump.rst new file +13
-0+devices within Automotive or Industrial having the following features: + - limited memory. + - require quick reboots after system faults. + +To minimize the dump file size and maximize the dump process speed, +Osdump provides the following features: + - excludes userspace memory, focusing solely on resolving OS-related issues. + - eliminates constant data such as text segments. + - core OS data for dumping, this includes: + - static allocated bss and data segments + - dynamic data such as: + - slub data for small-sized data + - some large-sized data alloced in pages.
I prefer allocated
Documentation/admin-guide/osdump.rst line 29
Quoted 6 lines
Documentation/admin-guide/osdump.rst new file +6
-0+ - compresses dump data to help reduce dump file size + +Considering the large volume of non-contiguous data, a binary data format is +used directly. + +By utilizing the dump file and vmlinux, a standard elf format file can be
ELF
Quoted 15 lines
Documentation/admin-guide/osdump.rst new file +15
-0+reassembled and parsed using crash tool. + +Declare +======== +Mainly test on arm64 with 2G DDR, selecting slub as SLAB allocator, 39-bit for +address space size. + +Configure and Build +=================== + +Kernel config +------------- +Disable CRASH_CORE, SLUB_DEBUG, and SLUB_TINY, and then select CONFIG_OS_MINIDUMP. + +Dts config
Documentation/admin-guide/osdump.rst line 54
Quoted 10 lines
Documentation/admin-guide/osdump.rst new file +10
-0+---------- +Add one reserved region for osdump. Its size depends DDR size you are using. Here +add one 16M reserved region with 2G's DDR. + +osdump { + compatible = "osdump"; + reg = <0 0x64000000 0 0x1000000>; +}; + +Build the image after you have done with configuration.
are
or
after you have done configuration.
Quoted 13 lines
Documentation/admin-guide/osdump.rst new file +13
-0+ +Trigger one panic and analysis it +================================= + +0) Precondition +--------------- +DDR won't poweroff during panic. Its content should not be lose. + +1) Generate dump file +--------------------- +When a panic occurs, it will dump core data into specific reserved region. + +echo c > /proc/sysrq-trigger
Documentation/admin-guide/osdump.rst line 77
Quoted 10 lines
Documentation/admin-guide/osdump.rst new file +10
-0+ +2) Get dump file +---------------- +When system reboot from panic, run the following command to get dump file. + +cat /proc/osdump > ./osdump + +Got 13M dump file on my side. + +3) Run crash tool to generate standard elf file
ELF
Documentation/admin-guide/osdump.rst line 83
Quoted 6 lines
Documentation/admin-guide/osdump.rst new file +6
-0+----------------------------------------------- + +crash --enable_raw_dumpfile ./vmlinux ./osdump -m vabits_actual=39 --machdep\ + kimage_voffset=0xffffffbf8f000000 --machdep phys_offset=0x80000000 + +Add new feature for crash tool that reassemble a standard elf format file with
reassembles ELF
Documentation/admin-guide/osdump.rst line 84
Quoted 1 line
Documentation/admin-guide/osdump.rst new file +1
-0+the dump file and vmlinux. Will submit this patch later.
but this paragraph shouldn't be here...
Documentation/admin-guide/osdump.rst line 94
Quoted 10 lines
Documentation/admin-guide/osdump.rst new file +10
-0+ +4) Analysis with crash tool +--------------------------- + +crash ./vmlinux ./osdump_elf + + +Note +==== +disable when select CRASH_CORE, SLUB_DEBUG, or SLUB_TINY.
Don't repeat that, please.
Vegard made a lot of good points. I tried not to repeat them.
Signature · 3 lines
#Randy https://people.kernel.org/tglx/notes-about-netiquette https://subspace.kernel.org/etiquette.html