From: Don Zickus <dzickus@redhat.com>
To: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: "Luck, Tony" <tony.luck@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Vivek Goyal <vgoyal@redhat.com>, Matthew Garrett <mjg@redhat.com>,
"Chen, Gong" <gong.chen@intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
"dle-develop@lists.sourceforge.net"
<dle-develop@lists.sourceforge.net>,
Satoru Moriya <satoru.moriya@hds.com>
Subject: Re: [RFC][PATCH -next] pstore: replace spin_lock with spin_trylock_irqsave in panic path
Date: Wed, 28 Sep 2011 10:09:33 -0400 [thread overview]
Message-ID: <20110928140933.GR5795@redhat.com> (raw)
In-Reply-To: <5C4C569E8A4B9B42A84A977CF070A35B2C56C9B8AD@USINDEVS01.corp.hds.com>
On Tue, Sep 27, 2011 at 03:46:08PM -0400, Seiji Aguchi wrote:
> Hi,
>
> >Yes we care - saving panic data is most likely the single most important
> >thing that pstore does. I just have severe doubts that it will actually
> >save anything useful if we just blindly continue if we can't get the lock.
>
> I agree with Tony. We may not get useful information if pstore just blindly continues
> while other cpus are running.
>
> >Is this patch based on a real-life case of a system deadlocking? I'd
> >like to know if we are just talking around the theoretical case that
> >the lock may be held at panic time - or something that has actually been
> >seen in real life.
>
> This patch is _not_ based on real-life case. I would like to avoid potential deadlock.
>
> If Don disagrees to my "return" code, I have another idea which moves pstore_dump() behind smp_send_stop().
> smp_send_stop() stops other cpus by sending IPI.
> So pstore can continue reliably and get useful information by just busting spinlock.
Yeah, Vivek had a similar idea to have the common panic path mimic what
they do with kdump, stop all the cpus except for the crashing one, to
serialize the crashing path. This would allow us to more easily bust
spinlocks without worrying about what the other cpus are doing.
The kdump solution involves using NMI whereas smp_send_stop (on x86)
avoids it because of past issues and instead uses the IRQ line. This
won't work if pstore_dump uses a spin_try_lock_irqsave() because the IRQ
line will be disable and never get the smp_send_stop() message (unless I
am reading the code wrong).
[reads the kernel/panic.c code] oh, I see this already exists, you would
just move the smp_send_stop() command up a couple lines of code.
[Side note] perhaps we should change the behaviour of smp_send_stop to use
NMI and create a blacklist of machines to use the IRQ line instead. I
assume the list of broken machines is small as Red Hat has been kdumping
kernels since 2.6.18 with little evidence that machines were failing
because NMI wasn't working properly.
Cheers,
Don
next prev parent reply other threads:[~2011-09-28 14:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-27 17:14 [RFC][PATCH -next] pstore: replace spin_lock with spin_trylock_irqsave in panic path Seiji Aguchi
2011-09-27 17:34 ` Don Zickus
2011-09-27 17:46 ` Luck, Tony
2011-09-27 17:59 ` Don Zickus
2011-09-27 19:02 ` Luck, Tony
2011-09-27 19:46 ` Seiji Aguchi
2011-09-28 14:09 ` Don Zickus [this message]
2011-09-28 18:55 ` Seiji Aguchi
2011-09-28 13:57 ` Don Zickus
2011-09-28 22:30 ` Luck, Tony
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=20110928140933.GR5795@redhat.com \
--to=dzickus@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dle-develop@lists.sourceforge.net \
--cc=gong.chen@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg@redhat.com \
--cc=satoru.moriya@hds.com \
--cc=seiji.aguchi@hds.com \
--cc=tony.luck@intel.com \
--cc=vgoyal@redhat.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.