From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933003AbbBIO1f (ORCPT ); Mon, 9 Feb 2015 09:27:35 -0500 Received: from v094114.home.net.pl ([79.96.170.134]:60359 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S932375AbbBIO1d (ORCPT ); Mon, 9 Feb 2015 09:27:33 -0500 From: "Rafael J. Wysocki" To: Peter Zijlstra Cc: Thomas Gleixner , "Li, Aubrey" , "Brown, Len" , Alan Cox , LKML , Linux PM list Subject: Re: [Update] Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state Date: Mon, 09 Feb 2015 15:50:34 +0100 Message-ID: <2271803.APdKPzvW0D@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/3.16.0-rc5+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20150209094926.GQ5029@twins.programming.kicks-ass.net> References: <54866625.8010406@linux.intel.com> <1684745.qMDN6HIHc8@vostro.rjw.lan> <20150209094926.GQ5029@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, February 09, 2015 10:49:26 AM Peter Zijlstra wrote: > On Fri, Feb 06, 2015 at 11:36:12PM +0100, Rafael J. Wysocki wrote: > > On Friday, February 06, 2015 07:29:22 PM Peter Zijlstra wrote: > > > > > So I'm a wee bit confused; if we use an enter_freeze() state that keeps > > > > interrupts disabled; who is going to call the freeze_wake() thing? > > > > > > Ah, I think I see, so we wake up, keep the interrupt pending, re-enable > > > the tick and time and everybody, then re-enable interrupts, take the > > > interrupt and go around the idle loop to find we need a reschedule etc.. > > > > Exactly. > > So x86 mwait can do this; Which is a big enough target already as far as I'm concerned. :-) > what other archs can 'sleep' and keep interrupts disabled? The IO port based entry method on old(ish) x86 (like my Toshiba test-bed laptop) keeps interrupts disabled too and that should cover ia64 (if they have ever cared about anything more than C1 anyway). There seem to be some entry methods that keep interrupts disabled on Power too. > It looks like the ARM WFI thing wakes on pending interrupts and doesn't > actually require interrupts to be enabled, so that too would work. Yes, it would. Moreover, for ARM that can do WFI only and nothing more than that it would be much better than full suspend, because the whole CPU offline dance we do then is a pure time loss for them. The newfangled PSCI stuff should work too AFAICS. -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.