linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
Cc: linux-acpi@vger.kernel.org, linux-pm@lists.linux-foundation.org
Subject: Re: [linux-pm] acpi_idle and max_cpus
Date: Mon, 18 Jun 2012 14:54:22 +0200	[thread overview]
Message-ID: <4FDF24FE.1010108@linaro.org> (raw)
In-Reply-To: <4FDF1E3A.6010200@linux.vnet.ibm.com>

On 06/18/2012 02:25 PM, Deepthi Dharwar wrote:
> Hi Daniel,
> 
> On 06/18/2012 01:48 AM, Daniel Lezcano wrote:
> 
>> On 06/15/2012 05:28 PM, Daniel Lezcano wrote:
>>>
>>> Hi all,
>>>
>>> I have a dual core Intel T9500.
>>>
>>> I boot the cpu with the acpi_idle driver and intel_idle enabled in the
>>> config.
>>>
>>> The kernel is booted with maxcpus=1.
>>>
>>> After the system has boot, I put cpu1 online via sysfs.
>>>
>>> But I don't see any 'cpuidle' directory in the cpu's sysfs entry:
>>>
>>> /sys/devices/system/cpu/cpu1/cpuidle (?)
>>>
>>> When I look at the code I see the notifier is present for hotplug in
>>> processor_driver.c and the cpuidle intel init routine should be called
>>> there.
>>>
> 
> 
> Yes, we have a hotplug notifier.
> Commit 99b72508  by Thomas Renninger fixed this issue.
> 
> Please let me know which kernel version you are running and what is idle
> driver registered ?

The kernel version is 3.5.0-rc1
The registered driver is acpi_idle (with intel_idle if I am not wrong).

Thomas's patch is in this version.

Maybe I am wrong but I think the patch is not correct because:

static int __cpuinit acpi_processor_add(struct acpi_device *device)
{

 ...

#ifdef CONFIG_SMP
	if (pr->id >= setup_max_cpus && pr->id != 0)
		return 0;
#endif

 ...

	per_cpu(processors, pr->id) = pr;

...
}

With max_cpus=1 we exit before setting up 'pr'.

So the condition in:

static int acpi_cpu_soft_notify(...)
{

	unsigned int cpu = (unsigned long)hcpu;
	struct acpi_processor *pr = per_cpu(processors, cpu);

	if (action == CPU_ONLINE && pr) {

...
}

Is always false because pr == NULL

I did the change but I don't still see the 'cpuidle' directory
appearing, I suspect also pr->flags.need_hotplug_init is not correctly
initialized but I did not investigate more.

>>> I am wondering is it a bug or an expected behavior ?
>>
>> Any thoughts on that ?
>>
>> Thanks
>>   -- Daniel
>>
>>
> 
> 
> Cheers
> Deepthi
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2012-06-18 12:54 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-15 15:28 acpi_idle and max_cpus Daniel Lezcano
2012-06-17 20:18 ` Daniel Lezcano
2012-06-18 12:25   ` Deepthi Dharwar
2012-06-18 12:54     ` Daniel Lezcano [this message]
2012-06-19  6:54       ` [linux-pm] " Deepthi Dharwar
2012-06-19  7:03         ` Srivatsa S. Bhat
2012-06-19  7:18           ` Daniel Lezcano
2012-06-19 15:30             ` Thomas Renninger
2012-06-25 11:25             ` [PATCH] acpi, cpuidle: Register with cpuidle even if cpu is onlined after boot (beyond maxcpus) Srivatsa S. Bhat
2012-06-25 13:53               ` Thomas Renninger
2012-06-25 16:03                 ` Srivatsa S. Bhat
2012-06-26  9:29                   ` Thomas Renninger
2012-06-26  9:41                     ` Daniel Lezcano
2012-06-26  9:58                       ` Srivatsa S. Bhat
2012-06-26 10:42                         ` Daniel Lezcano
2012-06-26 11:01                           ` Thomas Renninger
2012-06-27  9:07                             ` [PATCH] acpi: intel_idle : break dependency between modules Daniel Lezcano
2012-06-27 13:06                               ` Thomas Renninger
     [not found]                                 ` <201206271506.29034.trenn-l3A5Bk7waGM@public.gmane.org>
2012-06-28  8:03                                   ` Daniel Lezcano
2012-06-28  8:46                                 ` [PATCH v2] " Daniel Lezcano
2012-06-28 11:24                                   ` Srivatsa S. Bhat
2012-06-28 11:27                                     ` Daniel Lezcano
2012-06-28 11:56                                       ` Srivatsa S. Bhat
2012-06-28 19:24                                   ` Rafael J. Wysocki
2012-06-29  8:39                                     ` Daniel Lezcano
2012-06-29 22:27                                       ` Rafael J. Wysocki
2012-07-01 19:36                                         ` Daniel Lezcano
2012-06-27 16:16                               ` [PATCH] " Srivatsa S. Bhat
2012-06-28  7:34                                 ` [linux-pm] " Thomas Renninger
2012-06-28 11:23                                   ` Srivatsa S. Bhat
2012-06-26 11:07                           ` [PATCH] acpi, cpuidle: Register with cpuidle even if cpu is onlined after boot (beyond maxcpus) Srivatsa S. Bhat

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=4FDF24FE.1010108@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=deepthi@linux.vnet.ibm.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.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;
as well as URLs for NNTP newsgroup(s).