mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Toshi Kani <toshi.kani@hp.com>
Subject: Re: System slow down from udev
Date: Thu, 30 May 2013 21:48:07 +0200	[thread overview]
Message-ID: <2247867.QpkLZexzy2@vostro.rjw.lan> (raw)
In-Reply-To: <CAE9FiQX2tPe5EkdFBMtNwo73MqnVePKPxWCDktpa9BoJyRW5nQ@mail.gmail.com>

On Thursday, May 30, 2013 10:49:07 AM Yinghai Lu wrote:
> On Thu, May 30, 2013 at 10:42 AM, Yinghai Lu <yinghai@kernel.org> wrote:
> > On Thu, May 30, 2013 at 9:36 AM, Rafael J. Wysocki <rjw@sisk.pl> 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.

  reply	other threads:[~2013-05-30 19:39 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-28 23:39 Yinghai Lu
2013-05-28 23:50 ` Rafael J. Wysocki
2013-05-28 23:46   ` Yinghai Lu
2013-05-28 23:57     ` Rafael J. Wysocki
2013-05-29  0:01       ` Yinghai Lu
2013-05-29  0:30         ` Rafael J. Wysocki
2013-05-29  1:07           ` Greg Kroah-Hartman
2013-05-29  3:46           ` Yinghai Lu
2013-05-29 11:29             ` Rafael J. Wysocki
2013-05-29 20:13               ` Yinghai Lu
2013-05-29 21:34                 ` Rafael J. Wysocki
     [not found]                   ` <CAE9FiQV8CZN+mQvZScr16y9R1y6Tyx7uQg_DbNwE5KkHdi5H1w@mail.gmail.com>
2013-05-29 23:55                     ` Rafael J. Wysocki
2013-05-30  0:20                       ` Rafael J. Wysocki
2013-05-30  2:12                         ` Yinghai Lu
2013-05-30  1:55                       ` Yinghai Lu
2013-05-30 14:34                         ` Rafael J. Wysocki
2013-05-30 14:45                           ` Rafael J. Wysocki
2013-05-30 16:36                             ` Rafael J. Wysocki
2013-05-30 17:42                               ` Yinghai Lu
2013-05-30 17:49                                 ` Yinghai Lu
2013-05-30 19:48                                   ` Rafael J. Wysocki [this message]
2013-05-30 18:12                                 ` Yinghai Lu
2013-05-30 19:49                                   ` [PATCH] ACPI / processor: Initialize per_cpu(processors, pr->id) properly (Re: System slow down from udev) Rafael J. Wysocki
2013-05-30 19:46                                 ` System slow down from udev Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2247867.QpkLZexzy2@vostro.rjw.lan \
    --to=rjw@sisk.pl \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=toshi.kani@hp.com \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®