From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759965Ab3E3TjV (ORCPT ); Thu, 30 May 2013 15:39:21 -0400 Received: from hydra.sisk.pl ([212.160.235.94]:55078 "EHLO hydra.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759825Ab3E3TjL (ORCPT ); Thu, 30 May 2013 15:39:11 -0400 From: "Rafael J. Wysocki" To: Yinghai Lu Cc: Greg Kroah-Hartman , ACPI Devel Maling List , Linux Kernel Mailing List , Toshi Kani Subject: Re: System slow down from udev Date: Thu, 30 May 2013 21:48:07 +0200 Message-ID: <2247867.QpkLZexzy2@vostro.rjw.lan> User-Agent: KMail/4.9.5 (Linux/3.10.0-rc3+; KDE/4.9.5; x86_64; ; ) In-Reply-To: References: 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 Thursday, May 30, 2013 10:49:07 AM Yinghai Lu wrote: > On Thu, May 30, 2013 at 10:42 AM, Yinghai Lu wrote: > > On Thu, May 30, 2013 at 9:36 AM, Rafael J. Wysocki wrote: > >> On Thursday, May 30, 2013 04:45:35 PM Rafael J. Wysocki wrote: > >>> On Thursday, May 30, 2013 04:34:51 PM Rafael J. Wysocki wrote: > >> [...] > >>> > > >>> > I'll try to dig deeper locally in the meantime. > >>> > >>> Actually, I think I know what the problem is, but I need some more time to > >>> debug it. Fortunately, I'm able to see some symptoms. :-) > >> > >> OK, one fix is appended, but there still is one more bug I need to investigate. > >> > >> Please check if this one helps, though. > > > > yes, that fix the problem. > > > > > >> > >> Thanks, > >> Rafael > >> > >> > >> --- > >> drivers/acpi/acpi_processor.c | 5 +++++ > >> drivers/acpi/processor_driver.c | 3 --- > >> 2 files changed, 5 insertions(+), 3 deletions(-) > >> > >> Index: linux-pm/drivers/acpi/processor_driver.c > >> =================================================================== > >> --- linux-pm.orig/drivers/acpi/processor_driver.c > >> +++ linux-pm/drivers/acpi/processor_driver.c > >> @@ -78,9 +78,6 @@ static struct device_driver acpi_process > >> .remove = acpi_processor_stop, > >> }; > >> > >> -DEFINE_PER_CPU(struct acpi_processor *, processors); > >> -EXPORT_PER_CPU_SYMBOL(processors); > >> - > >> static void acpi_processor_notify(acpi_handle handle, u32 event, void *data) > >> { > >> struct acpi_device *device = data; > >> Index: linux-pm/drivers/acpi/acpi_processor.c > >> =================================================================== > >> --- linux-pm.orig/drivers/acpi/acpi_processor.c > >> +++ linux-pm/drivers/acpi/acpi_processor.c > >> @@ -29,6 +29,9 @@ > >> > >> ACPI_MODULE_NAME("processor"); > >> > >> +DEFINE_PER_CPU(struct acpi_processor *, processors); > >> +EXPORT_PER_CPU_SYMBOL(processors); > >> + > >> /* -------------------------------------------------------------------------- > >> Errata Handling > >> -------------------------------------------------------------------------- */ > >> @@ -387,6 +390,7 @@ static int __cpuinit acpi_processor_add( > >> * checks. > >> */ > >> per_cpu(processor_device_array, pr->id) = device; > >> + per_cpu(processors, pr->id) = pr; > >> > >> dev = get_cpu_device(pr->id); > >> result = acpi_bind_one(dev, pr->handle); > >> @@ -406,6 +410,7 @@ static int __cpuinit acpi_processor_add( > >> err: > >> free_cpumask_var(pr->throttling.shared_cpu_map); > >> device->driver_data = NULL; > >> + per_cpu(processors, pr->id) = NULL; > >> err_free_pr: > >> kfree(pr); > >> return result; > >> > > > > do you need to remove > > per_cpu(processors, pr->id) = NULL; > > from processor_driver.c::acpi_processor_stop ? > > also can you kill per_cpu processors ? Generally, yes, but not right now. > You should always get it from > acpi_device from per_cpu(processor_device_array, cpu) > then driver_data from it. That's correct, but that needs to be a separate patch and we'll need to track down all of the users. Thanks, Rafael -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.