From: Don Zickus <dzickus@redhat.com>
To: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
"Chen, Gong" <gong.chen@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Luck, Tony" <tony.luck@intel.com>,
Matthew Garrett <mjg@redhat.com>, Vivek Goyal <vgoyal@redhat.com>,
"len.brown@intel.com" <len.brown@intel.com>,
"ying.huang@intel.com" <ying.huang@intel.com>,
"ak@linux.intel.com" <ak@linux.intel.com>,
"hughd@chromium.org" <hughd@chromium.org>,
"mingo@elte.hu" <mingo@elte.hu>,
"jmorris@namei.org" <jmorris@namei.org>,
"a.p.zijlstra@chello.nl" <a.p.zijlstra@chello.nl>,
"namhyung@gmail.com" <namhyung@gmail.com>,
"dle-develop@lists.sourceforge.net"
<dle-develop@lists.sourceforge.net>,
Satoru Moriya <satoru.moriya@hds.com>
Subject: Re: [RFC][PATCH v2 -next 2/2] Adding lock operations to kmsg_dump()/pstore_dump()
Date: Fri, 28 Oct 2011 14:33:47 -0400 [thread overview]
Message-ID: <20111028183347.GE3452@redhat.com> (raw)
In-Reply-To: <5C4C569E8A4B9B42A84A977CF070A35B2C576122A9@USINDEVS01.corp.hds.com>
On Fri, Oct 21, 2011 at 05:21:35PM -0400, Seiji Aguchi wrote:
> pstore_dump()/kmsg_dump() may be called everywhere in kernel.
> So we have to care about following cases.
>
> - Panic path
> In this case, Logging message process is serialized via smp_send_stop().
> So, we can bust spin_locks.
>
> Currently, kmsg_dump() may be called twice (KMSG_DUMP_PANIC and KMSG_DUMP_EMERGY)
> So, for avoiding deadlock, I suggest to bust locks rather than skipping them.
>
> - NMI context
> While a cpu is in NMI handler, other cpus may be running.
> So, trylock should be called so that lockdep cheking works.
>
> - Process context
> In this case, we can simply take locks.
It ain't pretty but it moves things towards a more reliable message dump.
The odds of us needing to bust the spinlocks are really small. Most of
the time no one reads the pstore filesystem.
I would love to figure out a prettier solution for this locking mess, but
I can't think of anything. We have customers who want to utilize this
technology, so I am trying to make sure it is stable and robust for now.
A little selfish I suppose. But we are open to ideas?
Acked-by: Don Zickus <dzickus@redhat.com>
next prev parent reply other threads:[~2011-10-28 18:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-21 21:21 [RFC][PATCH v2 -next 2/2] Adding lock operations to kmsg_dump()/pstore_dump() Seiji Aguchi
2011-10-28 18:33 ` Don Zickus [this message]
2011-10-28 19:02 ` Luck, Tony
2011-10-28 20:00 ` Don Zickus
2011-11-10 12:50 ` Peter Zijlstra
2011-11-10 13:33 ` Don Zickus
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=20111028183347.GE3452@redhat.com \
--to=dzickus@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=dle-develop@lists.sourceforge.net \
--cc=gong.chen@intel.com \
--cc=hughd@chromium.org \
--cc=jmorris@namei.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mjg@redhat.com \
--cc=namhyung@gmail.com \
--cc=satoru.moriya@hds.com \
--cc=seiji.aguchi@hds.com \
--cc=tony.luck@intel.com \
--cc=vgoyal@redhat.com \
--cc=ying.huang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox