From: Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com>
To: <tony.luck@intel.com>, <keescook@chromium.org>,
<anton@enomsg.org>, <salyzyn@android.com>, <ccross@android.com>,
<seiji.aguchi.tr@hitachi.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: [RFD] pstore: pmsg: ramoops: add multiple pmsg instances
Date: Fri, 9 Oct 2015 10:52:52 +0900 [thread overview]
Message-ID: <56171DF4.2030209@hitachi.com> (raw)
Hello,
I'm trying to make the feature of multiple pmsg instances for ramoops.
I would like to discuss a possible way of getting the feature added to
mainline.
The reason to add the multiple pmsg is to preserve particular
messages over a long time, which are useful for failure analysis.
Currently, we can use /dev/pmsg0 to log userspace messages into pstore.
It is useful but we can use only one pstore buffer even if pstore
backend module (e.g. ramoops) can create multiple buffers. When one
messages happen to be generated repeatedly, old messages are
overwritten by them regardless of the importance of the messages.
Multiple pmsg will solves the problem. If we have two pmsg files:
/dev/pmsg{0,1}, we can write all messages into /dev/pmsg0, while
writing important ones into /dev/pmsg1. It can also be used for
preserving important kernel messages selected by an userspace daemon.
We have two types of files for pmsg. /dev/pmsg0 is for logging and
/sys/fs/pstore/pmsg-$backend-0 is for read. We can extend these files
like pmsg{0,1,2,...}, pmsg-$backend-{0,1,2,...}.
To realize this /dev/pmsgN interface, pstore backend modules which
manage multiple buffers for pmsg should tell the necessary numbers of
buffer to pstore_register_pmsg() via pstore_info. In addition, for
ramoops, I think the following works for ram.c are necessary at least.
* Parse multiple pmsg size in module parameter, for example,
pmsg_size=0x2000,0x1000,...
* Change pmsg_size in ramoops_platform_data to a pointer of size
array.
struct ramoops_platform_data {
...
- unsigned long pmsg_size;
+ unsigned long *pmsg_size;
...
};
When a ramoops's backend driver registers the platform_data and want
pmsg buffers, it should allocate an array of size for pmsg_size.
(Although there is no ramoops's backend which uses pmsg currently)
* Give an ID for each pmsg buffer, and modify some functions related to
buffer allocation.
What do you think about this idea?
Best regards,
Hiraku Toyooka
next reply other threads:[~2015-10-09 1:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-09 1:52 Hiraku Toyooka [this message]
2015-10-09 16:15 ` [RFD] pstore: pmsg: ramoops: add multiple pmsg instances Mark Salyzyn
2015-10-19 1:59 ` Hiraku Toyooka
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=56171DF4.2030209@hitachi.com \
--to=hiraku.toyooka.gu@hitachi.com \
--cc=anton@enomsg.org \
--cc=ccross@android.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=salyzyn@android.com \
--cc=seiji.aguchi.tr@hitachi.com \
--cc=tony.luck@intel.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 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.