From: Anton Vorontsov <anton.vorontsov@linaro.org>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: "Liu, Chuansheng" <chuansheng.liu@intel.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"keescook@chromium.org" <keescook@chromium.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Colin Cross <ccross@android.com>
Subject: Re: [PATCH] pstore: avoid recursive spinlocks in the oops_in_progress case
Date: Thu, 20 Sep 2012 16:25:36 -0700 [thread overview]
Message-ID: <20120920232536.GB8209@lizard> (raw)
In-Reply-To: <3908561D78D1C84285E8C5FCA982C28F19D43812@ORSMSX108.amr.corp.intel.com>
On Thu, Sep 20, 2012 at 11:09:36PM +0000, Luck, Tony wrote:
> > Mm... why break?
>
> We don't know what the back-end driver will do if we allow another call
> while a previous one is still in progress. It might end up corrupting the
> backing non-volatile storage and losing some previously saved records.
True, but the lock is used to protect pstore->buf, I doubt that
any backend will actually want to grab it, no?
Since it is pstore that is handing the buffer to backend, it is
pstore's worry to do proper locking.
> Existing drivers (ERST and EFI) are dependent on f/w ... so things might
> work on some platforms, yet be horribly bad on others.
>
> The patch as it was written converts a deadlock (hang) case into a "lose
> this log, but keep going" case. Which seems to be an improvement without
> taking any risks about what the backend will do.
But why backends should (or want/will want to) grab this lock?..
If a backend needs its own locking in ->write callback, then it'll
have to use its own lock, I guess.
Thanks,
Anton.
next prev parent reply other threads:[~2012-09-20 23:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-17 17:43 [PATCH] pstore: avoid recursive spinlocks in the oops_in_progress case Chuansheng Liu
2012-09-20 22:57 ` Anton Vorontsov
2012-09-20 23:09 ` Luck, Tony
2012-09-20 23:25 ` Anton Vorontsov [this message]
2012-09-20 23:48 ` Luck, Tony
2012-09-21 0:37 ` Anton Vorontsov
2012-09-24 15:02 ` Luck, Tony
2012-09-26 23:35 ` Anton Vorontsov
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=20120920232536.GB8209@lizard \
--to=anton.vorontsov@linaro.org \
--cc=ccross@android.com \
--cc=chuansheng.liu@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--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.