Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753737AbZCKWsP (ORCPT ); Wed, 11 Mar 2009 18:48:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752482AbZCKWr6 (ORCPT ); Wed, 11 Mar 2009 18:47:58 -0400 Received: from www.tglx.de ([62.245.132.106]:54560 "EHLO www.tglx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752309AbZCKWr5 (ORCPT ); Wed, 11 Mar 2009 18:47:57 -0400 Date: Wed, 11 Mar 2009 23:45:48 +0100 (CET) From: Thomas Gleixner To: "Rafael J. Wysocki" cc: Ingo Molnar , pm list , LKML , Linus Torvalds , "Eric W. Biederman" , Benjamin Herrenschmidt , Jeremy Fitzhardinge , Len Brown , Jesse Barnes , Frans Pop , =?ISO-8859-15?Q?Arve_Hj=F8nnev=E5g?= Subject: Re: [PATCH 1/10] PM: Rework handling of interrupts during suspend-resume (rev. 5) In-Reply-To: Message-ID: References: <200902221837.49396.rjw@sisk.pl> <200903111036.02482.rjw@sisk.pl> <200903112159.21166.rjw@sisk.pl> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1322 Lines: 35 On Wed, 11 Mar 2009, Thomas Gleixner wrote: > On Wed, 11 Mar 2009, Rafael J. Wysocki wrote: > > On Wednesday 11 March 2009, Thomas Gleixner wrote: > > > > +EXPORT_SYMBOL_GPL(suspend_device_irqs); > > > > > > I'm not too enthusiastic about this open coded implementation of > > > disable_irq() with slightly different semantics. > > > > The difference in semantics is important IMO, otherwise I woulndn't have > > done that. In particular, IMO, the condition should be under the spinlock IMO > > and I'd rather not synchronize all interrupts we don't really disable here. > > I don't say that the difference is not relevant. But the code is > almost the same and disable_irq() could have the sync_irq optimization > as well. Thought more about that. Avoiding the sync_irq() for irqs which have no action associated is fine, but you need to catch the following case as well: driver code calls disable_irq_nosyc() from the handler (which is still running) suspend code skips the sync due to depth > 0 The sync operation is not that expensive. Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/