From: Peter Zijlstra <peterz@infradead.org>
To: Petr Mladek <pmladek@suse.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Andrew Morton <akpm@linux-foundation.org>,
Jiri Kosina <jkosina@suse.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/spinlocks: Avoid a deadlock when someone unlock a zapped ticked spinlock
Date: Wed, 21 Oct 2015 13:11:20 +0200 [thread overview]
Message-ID: <20151021111120.GK17308@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1445419089-4350-1-git-send-email-pmladek@suse.com>
On Wed, Oct 21, 2015 at 11:18:09AM +0200, Petr Mladek wrote:
> There are few situations when we reinitialize (zap) ticket spinlocks. It
> typically happens when the system is going down after an error and we
> want to avoid deadlock in some important services. For example,
> zap_locks() in printk.c and ioapic_zap_locks().
So there's a few problems here. On x86 the code you patch is dead code,
x86 no longer uses ticket locks. Other archs might still.
And I entirely detest adding instructions to any lock path, be it the
utmost fast path or not, for something that will _never_ happen (on a
healthy system).
I would still very much recommend getting rid of the need for
zap_locks() in the first place.
What I did back when is punt on the whole printk buffer madness and dump
things to early_printk() without any locking.
I think that as long as the printk buffer has locks you have to accept
to loose some data when really bad stuff goes down.
next prev parent reply other threads:[~2015-10-21 11:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-21 9:18 Petr Mladek
2015-10-21 11:11 ` Peter Zijlstra [this message]
2015-10-22 9:39 ` Petr Mladek
2015-10-22 10:16 ` Peter Zijlstra
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=20151021111120.GK17308@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=jkosina@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pmladek@suse.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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
Powered by JetHome