From: Thomas Renninger <trenn@suse.de>
To: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org, tj@kernel.org, bhelgaas@google.com
Subject: Re: [PATCH 3/5] intel_idle: Split up and provide per CPU initialization func
Date: Tue, 17 Jan 2012 14:26:40 +0100 [thread overview]
Message-ID: <201201171426.40255.trenn@suse.de> (raw)
In-Reply-To: <4F15562B.1080406@kernel.org>
On Tuesday, January 17, 2012 12:06:19 PM Len Brown wrote:
> On 11/17/2011 05:36 PM, Thomas Renninger wrote:
>
> > 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
next prev parent reply other threads:[~2012-01-17 13:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1321569421-46220-1-git-send-email-trenn@suse.de>
2011-11-17 22:36 ` [PATCH 1/5] ACPI processor: Do not export acpi_idle_driver in processor.h Thomas Renninger
2012-01-17 11:25 ` Len Brown
2012-01-17 14:08 ` Thomas Renninger
2011-11-17 22:36 ` [PATCH 2/5] ACPI processor: Avoid WARN message on processor driver removal Thomas Renninger
2012-01-17 11:02 ` Len Brown
2012-01-17 14:25 ` Thomas Renninger
2012-01-17 14:41 ` Bjorn Helgaas
2012-01-17 14:58 ` Thomas Renninger
2011-11-17 22:36 ` [PATCH 3/5] intel_idle: Split up and provide per CPU initialization func Thomas Renninger
2011-11-17 22:44 ` Thomas Renninger
2012-01-17 11:06 ` Len Brown
2012-01-17 13:26 ` Thomas Renninger [this message]
2012-01-17 16:10 ` Thomas Renninger
2011-11-17 22:37 ` [PATCH 4/5] ACPI processor: Fix error path, also remove sysdev link Thomas Renninger
2011-11-17 22:37 ` [PATCH 5/5] ACPI processor: Remove unneeded variable passed by acpi_processor_hotadd_init Thomas Renninger
2012-01-17 11:10 ` Len Brown
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=201201171426.40255.trenn@suse.de \
--to=trenn@suse.de \
--cc=bhelgaas@google.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=tj@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;
as well as URLs for NNTP newsgroup(s).