Thread (31 messages) 31 messages, 5 authors, 2012-07-01

Re: [linux-pm] acpi_idle and max_cpus

From: Daniel Lezcano <hidden>
Date: 2012-06-18 12:54:26
Also in: linux-acpi

On 06/18/2012 02:25 PM, Deepthi Dharwar wrote:
Hi Daniel,

On 06/18/2012 01:48 AM, Daniel Lezcano wrote:
quoted
On 06/15/2012 05:28 PM, Daniel Lezcano wrote:
quoted
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.
quoted
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help