Thread (5 messages) 5 messages, 2 authors, 2012-01-17

Re: [PATCH 3/5] intel_idle: Split up and provide per CPU initialization func

From: Thomas Renninger <hidden>
Date: 2012-01-17 13:26:42

On Tuesday, January 17, 2012 12:06:19 PM Len Brown wrote:
On 11/17/2011 05:36 PM, Thomas Renninger wrote:
quoted
Function split up, should have no functional change
benefit?
The idea was:
Provide a basic init func which can be called in ACPI CPU hotplug
context safely before the CPU is brought up the first time and:
struct cpuinfo_x86
(like CPU features) of the new CPU is not set up yet.
Do the idle/throttling/... init later when the physically hotplugged
CPU is onlined the first time (and therefore got fully booted
and initialized).

While I had this working, I now have a better idea which does
not need this split:
When the ACPI CPU hotplug event is caught, fill up cpu_data(new_cpu)
data as much and good as possilbe, do something like:
memcpy(&cpu_data(new_cpu), &boot_cpu_data, sizeof(struct cpuinfo_x86);
and adjust:
phys_proc_id
cpu_core_id
apicid
initial_apicid
...
Then cpuidle (and throttling,...) can be initialized without the need
of booting up the CPU first.

Not sure whether the memcpy would succeed if the CPU is not (and never
was) online. From what I saw it should work, but I am not sure.
Tejun: Do you know that?

Another option would be what Bjorn Helgaas suggested:
Immediately online the CPU, but this would heavily interfere with
the current (generic code) approach, but after some thinking and
looking at the code: this shouldn't bring much benefit.

   Thomas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help