From: Mike Galbraith <bitbucket@online.de>
To: Andi Kleen <andi@firstfloor.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Ben Hutchings <ben@decadent.org.uk>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Steven Rostedt <rostedt@rostedt.homelinux.com>,
723180@bugs.debian.org, Brian Silverman <bsilver16384@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-rt-users@vger.kernel.org
Subject: Re: [PATCH] Revert "x86: Disable IST stacks for debug/int 3/stack fault for PREEMPT_RT"
Date: Sun, 05 Jan 2014 05:45:47 +0100 [thread overview]
Message-ID: <1388897147.5342.36.camel@marge.simpson.net> (raw)
In-Reply-To: <20140104181807.GS20765@two.firstfloor.org>
On Sat, 2014-01-04 at 19:18 +0100, Andi Kleen wrote:
> On Fri, Jan 03, 2014 at 02:55:48PM +0100, Sebastian Andrzej Siewior wrote:
> > where do I start. Let me explain what is going on here. The code
> > sequence
>
> Yes the IST stacks are needed for correctness, even in more cases than
> the example below. You cannot just disable them, just because you don't
> like them.
You had a better reason than dislike.
<quote>
From: Andi Kleen <ak@suse.de>
Date: Fri, 3 Jul 2009 08:44:10 -0500
Subject: [PATCH 209/303] x86: Disable IST stacks for debug/int 3/stack fault for PREEMPT_RT
Normally the x86-64 trap handlers for debug/int 3/stack fault run
on a special interrupt stack to make them more robust
when dealing with kernel code.
The PREEMPT_RT kernel can sleep in locks even while allocating
GFP_ATOMIC memory. When one of these trap handlers needs to send
real time signals for ptrace it allocates memory and could then
try to to schedule. But it is not allowed to schedule on a
IST stack. This can cause warnings and hangs.
This patch disables the IST stacks for these handlers for PREEMPT_RT
kernel. Instead let them run on the normal process stack.
...
A better solution would be to use similar logic as the NMI "paranoid"
path: check if signal is for user space, if yes go back to entry.S, switch stack,
call sync_regs, then do the signal sending etc.
</quote>
Or perhaps tell sleeping locks to spin in annoying spots? I converted
rt spinlocks globally to preemptible spinning locks (wasn't pretty, but
worked), so seems that could work.
-Mike
next prev parent reply other threads:[~2014-01-05 4:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20130917061329.4872.51468.reportbug@dell-inspiron-linux.dlinkrouter>
[not found] ` <1379427451.23881.48.camel@deadeye.wl.decadent.org.uk>
[not found] ` <CAP01z6LVxoA6kDJeL8NuO2aA22BjMvXSk9ZY7z9cOK1=k56vpg@mail.gmail.com>
[not found] ` <1379905562.3913.8.camel@deadeye.wl.decadent.org.uk>
[not found] ` <CAP01z6+j6moUio9pc3G3iz+ebJCdKEvngddxnxazRP+NXwLkyg@mail.gmail.com>
[not found] ` <1380115449.4430.21.camel@deadeye.wl.decadent.org.uk>
[not found] ` <52AE0419.3050103@linutronix.de>
2014-01-03 13:55 ` [PATCH] Revert "x86: Disable IST stacks for debug/int 3/stack fault for PREEMPT_RT" Sebastian Andrzej Siewior
2014-01-04 18:18 ` Andi Kleen
2014-01-05 4:45 ` Mike Galbraith [this message]
2014-01-05 5:05 ` Mike Galbraith
2014-01-05 18:04 ` Andi Kleen
2014-01-06 11:32 ` Sebastian Andrzej Siewior
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=1388897147.5342.36.camel@marge.simpson.net \
--to=bitbucket@online.de \
--cc=723180@bugs.debian.org \
--cc=a.p.zijlstra@chello.nl \
--cc=andi@firstfloor.org \
--cc=ben@decadent.org.uk \
--cc=bigeasy@linutronix.de \
--cc=bsilver16384@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=rostedt@rostedt.homelinux.com \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).