From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932632Ab3BSKoi (ORCPT ); Tue, 19 Feb 2013 05:44:38 -0500 Received: from www.linutronix.de ([62.245.132.108]:60368 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932339Ab3BSKog (ORCPT ); Tue, 19 Feb 2013 05:44:36 -0500 Date: Tue, 19 Feb 2013 11:44:19 +0100 (CET) From: Thomas Gleixner To: Frederic Weisbecker cc: Linus Torvalds , Paul McKenney , Ingo Molnar , Peter Zijlstra , Dave Jones , Hugh Dickins , Linux Kernel Mailing List , Paul McKenney , linux-arch@vger.kernel.org Subject: Re: Debugging Thinkpad T430s occasional suspend failure. In-Reply-To: Message-ID: References: <20130213193411.GA15928@redhat.com> <20130215011503.GA11914@redhat.com> <20130215174435.GA2792@linux.vnet.ibm.com> <20130218155324.GA5816@somewhere.redhat.com> User-Agent: Alpine 2.02 (LFD 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 : > > 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