From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755233Ab2GaDXb (ORCPT ); Mon, 30 Jul 2012 23:23:31 -0400 Received: from mga14.intel.com ([143.182.124.37]:33755 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752119Ab2GaDXa (ORCPT ); Mon, 30 Jul 2012 23:23:30 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.71,315,1320652800"; d="scan'208";a="128661870" Date: Tue, 31 Jul 2012 11:18:32 +0800 From: Feng Tang To: Cc: "Paul E. McKenney" , Len Brown , "Rafael J. Wysocki" , Linux Kernel Mail List Subject: Re: [Regression 3.4] tick_broadcast_mask is not restored after a CPU has been offline/onlined Message-ID: <20120731111832.435b8bd9@feng-i7> In-Reply-To: <20120730174218.GA30772@linux.vnet.ibm.com> References: <20120730151559.772d4055@feng-i7> <20120730133913.GK2556@linux.vnet.ibm.com> <20120730230747.7637112a@feng-i7> <20120730170847.GE2391@linux.vnet.ibm.com> <20120730174218.GA30772@linux.vnet.ibm.com> Organization: intel X-Mailer: Claws Mail 3.7.6 (GTK+ 2.22.0; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Paul, On Mon, 30 Jul 2012 10:42:18 -0700 "Paul E. McKenney" wrote: > On Mon, Jul 30, 2012 at 10:08:47AM -0700, Paul E. McKenney wrote: > > On Mon, Jul 30, 2012 at 11:07:47PM +0800, Feng Tang wrote: > > > Hi Paul, > > > > > > On Mon, 30 Jul 2012 06:39:13 -0700 > > > "Paul E. McKenney" wrote: > > > > > > > On Mon, Jul 30, 2012 at 03:15:59PM +0800, Feng Tang wrote: > > > > > Hi All, > > > > > > > > > > When I debugged a suspend/resume bug, I found that > > > > > tick_broadcast_mask is not restored for a CPU after it is > > > > > offline/onlined since kernel 3.4, while it's fine for 3.3. > > > > > > > > Could you please try 3.5? > > > > > > Yes, it's the same for 3.5 > > > > Thank you for checking, Feng. > > > > Len, the comment above the change says: > > > > /* > > * FIXME: Design the ACPI notification to make it once per > > * system instead of once per-cpu. This condition is a hack > > * to make the code that updates C-States be called once. > > */ > > > > Is it time for this design-level change? Or is there something obvious > > that I missed when fixing the smp_processor_id() splat? > > > > I could revert back, but use raw_smp_processor_id() rather than > > smp_processor_id(), but that feels like papering over a problem rather > > than fixing it. > > But should papering be appropriate, here is the patch. > > Thanx, Paul Just found and have a patch to fix a typo in acpi processor_driver.c, which could also fix this tick_broadcast_mask issue. Patch is in https://lkml.org/lkml/2012/7/30/483 So I think we don't need this "papering over" patch :) Thanks, Feng > > ------------------------------------------------------------------------ > > ACPI: Repair fix to unprotected smp_processor_id() > > Commit 9505626d (ACPI: Fix unprotected smp_processor_id() in > acpi_processor_cst_has_changed()) introduced a suspend/resume bug. > This commit therefore introduces a bug-for-bug compatible fix for the > original problem. > > Reported-by: Feng Tang > Signed-off-by: Paul E. McKenney > > diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c > index 47a8caa..19c151a 100644 > --- a/drivers/acpi/processor_idle.c > +++ b/drivers/acpi/processor_idle.c > @@ -1218,7 +1218,8 @@ int acpi_processor_cst_has_changed(struct > acpi_processor *pr) > * to make the code that updates C-States be called once. > */ > > - if (pr->id == 0 && cpuidle_get_driver() == &acpi_idle_driver) { > + if (raw_smp_processor_id() == 0 && > + cpuidle_get_driver() == &acpi_idle_driver) { > > cpuidle_pause_and_lock(); > /* Protect against cpu-hotplug */ >