Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753209Ab2B0IqH (ORCPT ); Mon, 27 Feb 2012 03:46:07 -0500 Received: from merlin.infradead.org ([205.233.59.134]:55619 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752781Ab2B0IqG convert rfc822-to-8bit (ORCPT ); Mon, 27 Feb 2012 03:46:06 -0500 Message-ID: <1330332354.11248.32.camel@twins> Subject: Re: [PATCH] Extend mwait idle to optimize away CAL and RES interrupts to an idle CPU -v1 From: Peter Zijlstra To: Venki Pallipadi Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Suresh Siddha , Aaron Durbin , Paul Turner , Yong Zhang , linux-kernel@vger.kernel.org Date: Mon, 27 Feb 2012 09:45:54 +0100 In-Reply-To: References: <1329957415-15239-1-git-send-email-venki@google.com> <1329989454.24994.57.camel@twins> Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Mailer: Evolution 3.2.2- Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1318 Lines: 32 On Thu, 2012-02-23 at 11:34 -0800, Venki Pallipadi wrote: > > > + local_bh_disable(); > > > + local_irq_disable(); > > > > That local_bh_disable() is completely superfluous, disabling IRQs > > already kills bh. > > The reason for local_bh_disable/enable was to check for potential > softirqs after these interrupt. Why is that needed? We never wrap local_irq_disable() in bh muck? > > Why doesn't ipiless_idle_exit() call this? That would keep it isolated > > to just those idle routines that actually use mwait instead of bothering > > the generic idle paths with this. > > ipiless_idle_exit is called in the inner most part of idle entry exit. > In mwait case we may not even have interrupts enabled at that time and > there is code that does idle residency timing etc which will get > impacted if we start doing the pending ipi work there. Doing it at > higher level along with things like enter-exit tickless felt nicer. But but but, an actual interrupt can be handled before the instruction after mwait, so why would this be a problem? -- 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/