From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932202AbbCBWFV (ORCPT ); Mon, 2 Mar 2015 17:05:21 -0500 Received: from v094114.home.net.pl ([79.96.170.134]:64839 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753846AbbCBWFS (ORCPT ); Mon, 2 Mar 2015 17:05:18 -0500 From: "Rafael J. Wysocki" To: Lorenzo Pieralisi , Peter Zijlstra Cc: Daniel Lezcano , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "preeti@linux.vnet.ibm.com" Subject: Re: [PATCH 2/2] cpuidle / sleep: Use broadcast timer for states that stop local timer Date: Mon, 02 Mar 2015 23:28:50 +0100 Message-ID: <6302236.aVZ7nQWQdn@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/3.19.0+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20150302162706.GB5515@red-moon> References: <1424800730-32059-1-git-send-email-lorenzo.pieralisi@arm.com> <89103967.z1sWWFaE6y@vostro.rjw.lan> <20150302162706.GB5515@red-moon> 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, March 02, 2015 04:27:06 PM Lorenzo Pieralisi wrote: > On Mon, Mar 02, 2015 at 02:53:28PM +0000, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > > > Commit 381063133246 (PM / sleep: Re-implement suspend-to-idle handling) > > overlooked the fact that entering some sufficiently deep idle states > > by CPUs may cause their local timers to stop and in those cases it > > is necessary to switch over to a broadcase timer prior to entering > > s/broadcase/broadcast Yup, thanks! > > the idle state. If the cpuidle driver in use does not provide > > the new ->enter_freeze callback for any of the idle states, that > > problem affects suspend-to-idle too, but it is not taken into account > > after the changes made by commit 381063133246. > > > > Fix that by changing the definition of cpuidle_enter_freeze() and > > re-arranging of the code in cpuidle_idle_call(), so the former does > > not call cpuidle_enter() any more and the fallback case is handled > > by cpuidle_idle_call() directly. > > > > Fixes: 381063133246 (PM / sleep: Re-implement suspend-to-idle handling) > > Reported-by: Lorenzo Pieralisi > > Signed-off-by: Rafael J. Wysocki > > Minor comment below, otherwise on the 4-patch series: > > Tested-by: Lorenzo Pieralisi > > [...] > > > /** > > * cpuidle_enter_freeze - Enter an idle state suitable for suspend-to-idle. > > + * @drv: cpuidle driver for the given CPU. > > + * @dev: cpuidle device for the given CPU. > > * > > * If there are states with the ->enter_freeze callback, find the deepest of > > * them and enter it with frozen tick. Otherwise, find the deepest state > > * available and enter it normally. > > Comment above becomes stale so you should update it, other than that it > seems fine. Sure, I forgot to update it, thanks for pointing this out. I'll queue up the two (with the above fixed) in my tree then. Peter, any objections to this one and the [1/2]? Rafael