From: David VomLehn <dvomlehn@cisco.com>
To: Tim Bird <tim.bird@am.sony.com>
Cc: Grant Likely <grant.likely@secretlab.ca>,
Daniel Walker <dwalker@mvista.com>,
linux-embedded@vger.kernel.org
Subject: Re: [PATCH] [RFC] emit-crash-char: Allow diversion of printk output for crash logging
Date: Wed, 13 Aug 2008 13:27:10 -0700 [thread overview]
Message-ID: <48A3439E.2060702@cisco.com> (raw)
In-Reply-To: <48A32FC4.7060006@am.sony.com>
Tim Bird wrote:
> David VomLehn wrote:
>> Our use case is:
>> 1. We register a panic handler
>> 2. The kernel panics and calls our panic handler
>> 3. We register a function to log printk output
>> 4. We print registers, stack, memory, and various other pieces of
>> information using standard kernel functions, which all use printk
>> 5. As printk output is generated, we store it in memory
>> 6. We unregister the printk logging function
>> 7. The panic handler exits
>> 8. The kernel does the rest of its usual panic handling
...
>
> I'm not sure exactly what triggers the transition from step 5 to 6 in
> your steps above. That is, how do you know when to unregister the
> printk logging function?
The printk logging function is unregistered when we are done printing everything
we're interested in.
> But, taking a step back, instead of storing the information somewhere
> else, why not just use the log buffer as the storage medium, and transfer
> that all-at-once when you've collected the information you want?
An interesting suggestion, but we've seen cases where the logging itself causes
subsequent faults. In such cases, you would get nothing at all if you waited to
store information until you've collected everything. A partial report,
particularly if you've tried to print the most useful things first, is better
than none at all. In addition, there is the risk that, for a particularly long
report, you might wrap the log buffer and lose the first part of your output.
--
David VomLehn
prev parent reply other threads:[~2008-08-13 20:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-08 2:20 [PATCH] [RFC] emit-crash-char: Allow diversion of printk output for crash logging David VomLehn
2008-08-08 15:55 ` Daniel Walker
2008-08-08 16:05 ` Mike Frysinger
2008-08-08 16:17 ` Daniel Walker
2008-08-08 18:09 ` Mike Frysinger
2008-08-08 20:10 ` Daniel Walker
2008-08-08 20:13 ` Mike Frysinger
2008-08-08 20:47 ` Daniel Walker
2008-08-08 21:24 ` [PATCH] [RFC] emit-crash-char: Allow diversion of printkoutput " Haller, John H (John)
2008-08-08 22:01 ` Daniel Walker
2008-08-11 23:34 ` [PATCH] [RFC] emit-crash-char: Allow diversion of printk output " David VomLehn
2008-08-12 22:39 ` Grant Likely
2008-08-13 1:30 ` David VomLehn
2008-08-13 2:12 ` Grant Likely
2008-08-13 17:56 ` David VomLehn
2008-08-13 19:02 ` Tim Bird
2008-08-13 20:27 ` David VomLehn [this message]
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=48A3439E.2060702@cisco.com \
--to=dvomlehn@cisco.com \
--cc=dwalker@mvista.com \
--cc=grant.likely@secretlab.ca \
--cc=linux-embedded@vger.kernel.org \
--cc=tim.bird@am.sony.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).