From: Thomas Gleixner <tglx@linutronix.de>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Paul McKenney <paulmck@linux.vnet.ibm.com>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Dave Jones <davej@redhat.com>, Hugh Dickins <hughd@google.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Paul McKenney <paul.mckenney@linaro.org>,
linux-arch@vger.kernel.org
Subject: Re: Debugging Thinkpad T430s occasional suspend failure.
Date: Tue, 19 Feb 2013 11:44:19 +0100 (CET) [thread overview]
Message-ID: <alpine.LFD.2.02.1302191141480.22263@ionos> (raw)
In-Reply-To: <CAFTL4hxaOKvNSWkHgw80Cp1JTNEGXREWHtyQJEzeNgUZHMyTyQ@mail.gmail.com>
CC'ing linux-arch, so the arch folks can scream murder if they have
any objections.
On Tue, 19 Feb 2013, Frederic Weisbecker wrote:
> 2013/2/18 Thomas Gleixner <tglx@linutronix.de>:
> > On Mon, 18 Feb 2013, Frederic Weisbecker wrote:
> >> diff --git a/kernel/softirq.c b/kernel/softirq.c
> >> index ed567ba..69fbefd 100644
> >> --- a/kernel/softirq.c
> >> +++ b/kernel/softirq.c
> >> @@ -277,6 +277,17 @@ restart:
> >> tsk_restore_flags(current, old_flags, PF_MEMALLOC);
> >> }
> >>
> >> +#ifndef __ARCH_IRQ_EXIT_IRQS_DISABLED
> >
> > We really should get rid of that and make irqs disabled on irq exit
> > mandatory.
>
> Until now I even thought that having irqs disabled in irq_exit() was
> mandatory. I need to have a second look at tick_nohz_irq_exit() as I
> modified it with this requirement in mind...
Duh.
> Also with this patch, if a nesting interrupt happens right after
> tick_nohz_irq_exit(), this new irq will call tick_nohz_stop_idle() but
> not tick_nohz_start_idle() on the end. Leaving that unbalanced. I
> could work that around but I don't want to spaghettize further around
> that ifdef.
>
> So this patch actually does depend on __ARCH_IRQ_EXIT_IRQS_DISABLED. I
> need to convert all archs to force this first. Then think about the
> softirq.c cleanup once its done.
>
> I wonder what's the right path to this, may be loop over archs until
> they all have __ARCH_IRQ_EXIT_IRQS_DISABLED, then remove that? Sounds
> like non-sense but the safest way at the same time.
Yeah.
> >> static inline void invoke_softirq(void)
> >> {
> >> - if (!force_irqthreads) {
> >> + /* Can we run softirq's at all? We migth be nesting interrupts */
> >> + if (in_nesting_interrupt())
> >> + return;
> >
> > We might also be in a softirq disabled region where it makes no sense
> > to continue. So this should be
> >
> > in_nesting_interrupt() || in_softirq()
>
> in_nesting_interrupt() takes care of that as well.
Gah, misread the macro maze :(
Thanks,
tglx
parent reply other threads:[~2013-02-19 10:44 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <CAFTL4hxaOKvNSWkHgw80Cp1JTNEGXREWHtyQJEzeNgUZHMyTyQ@mail.gmail.com>]
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=alpine.LFD.2.02.1302191141480.22263@ionos \
--to=tglx@linutronix.de \
--cc=davej@redhat.com \
--cc=fweisbec@gmail.com \
--cc=hughd@google.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paul.mckenney@linaro.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).